PEAR_ErrorStack and staticCallback(...)
| From: | Sean Coates | Date: | Wed, 12 May 2004 16:28:05 +0000 |
| Subject: | PEAR_ErrorStack and staticCallback(...) | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-29151@lists.php.net to get a copy of this message | ||
Hello dev list.
Had a smallish conversation on IRC about this, and it was suggested that I post to the list.
Consider the following code:
<?php
require_once('PEAR.php');
require_once('PEAR/ErrorStack.php');
function static_callback()
{
echo "static_callback(...) called.\n";
print_r(func_get_args());
}
PEAR_ErrorStack::staticPushCallback('static_callback');
PEAR_ErrorStack::staticPush('teststack', 100, 'error', array('test' => 'testing'), 'test error -- testing callback');
// static_callback() is never called
?>
It SEEMS that staticPush never calls the callback -- I took a look through the code (ErrorStack.php) and I'm not sure why this happens.
If this is a user (my) error, I offer my sincere apologies for troubling the dev list, but I believe this to be a PEAR problem -- please correct me if I'm being stupid (-:
I would like some confirmation before I file this as a bug, but will be happy to do so if this is determined to be a bug.
Thanks,
S