Michiel12378 Posted September 12, 2015 Share Posted September 12, 2015 Hi all !I have a big problem with my website i have a error :Fatal error: Call to a member function read() on a non-object in /home/u499569904/public_html/lib/class_fm.php on line 59can someone fix this ?Skype : Michiel12378Thx bro's !Image : Quote Link to comment https://forums.phpfreaks.com/topic/298141-fatal-error-call-to-a-member-function-read-on-a-non-object-in-public_htmllibclass_fmphp-on-line-59/ Share on other sites More sharing options...
ginerjm Posted September 12, 2015 Share Posted September 12, 2015 The error is telling you that whatever you are attaching to that call to read() is NOT an object or not an object of the correct type. Ex. - If you have $my_obj->read(), it means that $my_obj is not an object. Quote Link to comment https://forums.phpfreaks.com/topic/298141-fatal-error-call-to-a-member-function-read-on-a-non-object-in-public_htmllibclass_fmphp-on-line-59/#findComment-1520726 Share on other sites More sharing options...
hansford Posted September 13, 2015 Share Posted September 13, 2015 class MyObj { public function read() { //do something } } MyObj = new MyObj(); // create new object MyObj->read(); //this works MyObj->write(); //fatal error as the there is no member function called "write" of this object Quote Link to comment https://forums.phpfreaks.com/topic/298141-fatal-error-call-to-a-member-function-read-on-a-non-object-in-public_htmllibclass_fmphp-on-line-59/#findComment-1520752 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.