Skip to content

Commit

Permalink
Installables app: use call_user_func()
Browse files Browse the repository at this point in the history
Calling a static method by name from a variable is not supported prior
to PHP 7.

See #404
  • Loading branch information
JDGrimes committed Aug 23, 2017
1 parent 99fdf23 commit d3eab4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/classes/installables/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected function get_installable( $type, $slug ) {

// May be a loader function or the class name itself.
if ( is_callable( $loader ) ) {
$installable = $loader( $type, $slug );
$installable = call_user_func( $loader, $type, $slug );
} else {
$installable = new $loader();
}
Expand Down

0 comments on commit d3eab4d

Please sign in to comment.