version 2.0 - call to a member function on non-object
Permalink Browser Info Environment
Ran into the error "Call to a member function getUserID() on a non-object in formidable/models/formidable.php on line 142"
Looked into the method and found the following code:
since User::getByUserID() returns either an object or false the test will cause that error if $value isn't found ...
changed the test to be:
There are a couple of other places that need to be verified like that since the arguments aren't verified before calling the static method ...
Looked into the method and found the following code:
$u = User::getByUserID($value); if (intval($u->getUserID()) != 0)
since User::getByUserID() returns either an object or false the test will cause that error if $value isn't found ...
changed the test to be:
There are a couple of other places that need to be verified like that since the arguments aren't verified before calling the static method ...
Type: | Discussion |
---|---|
Status: | Resolved |
Thanx. Resolved in newer versions...
Best,
Corretje