Problem with php script - error message?

Code junkies hangout here

Moderators: ChrThor, LXF moderators

Problem with php script - error message?

Postby mikejd » Tue Sep 23, 2014 9:02 am

Hi, I wonder if any php coders can help with the error message I am getting when I run a form script.

The script is FormMail from Tectite.com. I have used it on a number of sites for a few years without any problem, but I have just added it to another site & I am getting an error message. I have googled the message but get no links. Tectite don't provide support as the script is free and they have closed their community forum. Any information would be appreciated.

Error message :
Strict Standards: Non-static method FieldManager::IsEmpty() should not be called statically in /homepages/25/d392230535/htdocs/cgi-bin/custdb2.php on line 4762

It says that the Form submission was successful but no email is received and nothing added to the database.

cheers,
Mike
mikejd
LXF regular
 
Posts: 141
Joined: Fri Apr 08, 2005 4:46 pm
Location: Huntly, Aberdeenshire

Re: Problem with php script - error message?

Postby shifty_ben » Sat Jan 31, 2015 1:28 am

Probably way too late to be of any use to you, but...

The method IsEmpty() has not been declared as a static function (i.e. it's supposed to be called as part of an object) rather than directly (statically).

Basically, rather than FieldManager::IsEmpty(), the call should be made through an object: $obj->isEmpty()

In most cases it's harmless, but it is bad practice (and depending on the function may cause issues). I would guess that in this case, it may not be harmless - if the method is supposed to check one of the objects properties, then it'll fail to do so as it's not being called as part of an object.
User avatar
shifty_ben
LXF regular
 
Posts: 1293
Joined: Tue Oct 04, 2005 9:56 am
Location: Ipswich


Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests