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 #170912 is a reply to message #170911] Wed, 08 December 2010 03:55 Go to previous messageGo to previous message
Roy Smith is currently offline  Roy Smith
Messages: 11
Registered: November 2010
Karma:
Junior Member
> 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.

This is kind of confusing. The docs (http://us3.php.net/manual/en/
function.set-error-handler.php) say (in the changelog section):

"Instead of a function name, an array containing an object reference
and a method name can also be supplied as the error_handler"

which agrees with what you say, but on that same page, there's a
comment from "jonbarnett at gmail dot com" which says:

---------------------------------------
The proper way to set a callback for a static class function is:

array("Classname", "functionname")

The class name is a string. If you don't quote the string, PHP treats
it as a barestring and triggers a notice.
---------------------------------------

Is the comment just wrong?
[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:37:04 GMT 2024

Total time taken to generate the page: 0.09150 seconds