FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » What could be causing this "Invalid callback" warning?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
What could be causing this "Invalid callback" warning? [message #170910] Wed, 08 December 2010 03:33 Go to previous message
Roy Smith is currently offline  Roy Smith
Messages: 11
Registered: November 2010
Karma:
Junior Member
We're setting our own error handler by calling:

set_error_handler(array('Amie_ResponseHandler','errorHandler'));

this seems work work fine everywhere, except in one case where we do

require_once("HTTP/Request.php");

which loads the PEAR HTTP_Request class. That file generates some
deprecation warnings when it's loaded. I understand why we're getting
the deprecation warnings, but the weird thing is we're also getting
complains about our error handler being an invalid callback:

[07-Dec-2010 21:48:53] PHP Deprecated: Assigning the return value of
new by reference is deprecated in /usr/share/php/HTTP/Request.php on
line 402
[07-Dec-2010 21:48:53] PHP Warning: Invalid callback
Amie_ResponseHandler::errorHandler, class 'Amie_ResponseHandler' not
found in /usr/share/php/HTTP/Request.php on line 722

this makes no sense. I *know* the Amie_ResponseHandler class exists,
and has already been loaded. I can watch our autoloader code load the
file, and set_error_hander() call shown above is in a static method of
that class; the fact that the error handler was registered at all
pretty much proves the class was loaded.

I'm stumped what might be going on. Any clues where to look to figure
this out?

We're running:

PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010
13:49:46)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Try to write php code for this ..
Next Topic: Session Handling for multiple languages, permission denied
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 05:53:59 GMT 2024

Total time taken to generate the page: 0.03243 seconds