mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Check for string, as method may be an array. fixes #10778
git-svn-id: http://svn.automattic.com/wordpress/trunk@13958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c6aed04009
commit
5c8d92d2b1
@ -356,7 +356,7 @@ EOD;
|
|||||||
$args = $args[0];
|
$args = $args[0];
|
||||||
}
|
}
|
||||||
// Are we dealing with a function or a method?
|
// Are we dealing with a function or a method?
|
||||||
if (substr($method, 0, 5) == 'this:') {
|
if ( is_string( $method ) && substr($method, 0, 5) == 'this:' ) {
|
||||||
// It's a class method - check it exists
|
// It's a class method - check it exists
|
||||||
$method = substr($method, 5);
|
$method = substr($method, 5);
|
||||||
if (!method_exists($this, $method)) {
|
if (!method_exists($this, $method)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user