mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
* check that error callbacks exist
This commit is contained in:
parent
ad8dbb8d10
commit
4f84d76ed7
1 changed files with 3 additions and 3 deletions
|
@ -212,9 +212,9 @@ class PEAR
|
|||
|
||||
case PEAR_ERROR_CALLBACK:
|
||||
$setmode = $mode;
|
||||
if (is_string($options) ||
|
||||
(is_array($options) && sizeof($options) == 2 &&
|
||||
is_object($options[0]) && is_string($options[1]))) {
|
||||
if ((is_string($options) && function_exists($options)) ||
|
||||
(is_array($options) && method_exists(@$options[0], @$options[1])))
|
||||
{
|
||||
$setcallback = $options;
|
||||
} else {
|
||||
trigger_error("invalid error callback", E_USER_WARNING);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue