Browse Source

verified unit test pear2.phpt works with changes, removing old code

PEAR_1_4DEV
Greg Beaver 23 years ago
parent
commit
dcd7f23e6c
  1. 33
      pear/PEAR.php

33
pear/PEAR.php

@ -311,45 +311,12 @@ class PEAR
case PEAR_ERROR_CALLBACK:
$setmode = $mode;
/*
$doSet = false;
// function callback
if (is_string($options) && function_exists($options)) {
$doSet = true;
} */
// class/object method callback
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])) {
// static method callback
if (is_string($options[0])) {
if (class_exists($options[0]) &&
in_array(strtolower($options[1]),
get_class_methods($options[0])))
{
$doSet = true;
}
}
// object method callback
if (is_object($options[0])) {
if (method_exists($options[0], $options[1])) {
$doSet = true;
}
}
}
}
}
if ($doSet) {
$setoptions = $options;
} else {
trigger_error("invalid error callback", E_USER_WARNING);
} */
break;
default:

Loading…
Cancel
Save