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 #170913 is a reply to message #170912] Wed, 08 December 2010 04:08 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:55 PM, Roy Smith wrote:
>> 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?

No, that's for a STATIC function. You are not calling a static member
of the class, so an object is required (which is what your message is
telling you).

--
==================
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:42:58 GMT 2024

Total time taken to generate the page: 0.03858 seconds