Browse Source

use is_callable() - what a great function!

PEAR_1_4DEV
Greg Beaver 23 years ago
parent
commit
140ec7f354
  1. 9
      pear/PEAR.php

9
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:

Loading…
Cancel
Save