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
Re: What could be causing this "Invalid callback" warning? [message #170911 is a reply to message #170910] Wed, 08 December 2010 03:43 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 12/7/2010 10:33 PM, Roy Smith wrote:
> 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)
>

The first element of the array you're passing must be an object of the
error handler, not a string with the name of the class.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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 07:30:53 GMT 2024

Total time taken to generate the page: 0.05674 seconds