From: Greg Beaver Date: Thu, 11 Sep 2003 13:16:13 +0000 (+0000) Subject: use is_callable() - what a great function! X-Git-Tag: RELEASE_0_7~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=140ec7f354da35e8405371673d8d6f7b936f81ec;p=php use is_callable() - what a great function! --- diff --git a/pear/PEAR.php b/pear/PEAR.php index 7081547634..805d5acee7 100644 --- a/pear/PEAR.php +++ b/pear/PEAR.php @@ -317,7 +317,12 @@ class PEAR $doSet = true; } // class/object method callback - if (is_array($options)) { + if (is_callable($options)) { + $setoptions = $options; + } else { + trigger_error("invalid error callback", E_USER_WARNING); + } +/* if (is_array($options)) { if (isset($options[0]) && isset($options[1])) { $options = array(&$options[0], $options[1]); if (is_string($options[1])) { @@ -343,7 +348,7 @@ class PEAR $setoptions = $options; } else { trigger_error("invalid error callback", E_USER_WARNING); - } + } */ break; default: