dennismonsewicz Posted November 25, 2008 Share Posted November 25, 2008 I am building a customized component for my joomla instance and I am receiving the following error: Fatal error: Call to a member function load() on a non-object (it is on line 43) This is line 43: if (isset($cid[0])) { $row->load($cid[0]); //LINE 43 } This is how the variable is being set: $cid = JRequest::getVar('cid', array(), 'GET', 'array'); what am i doing wrong? Thanks in advance for any and all help! Quote Link to comment https://forums.phpfreaks.com/topic/134259-joomla-help/ Share on other sites More sharing options...
Mchl Posted November 25, 2008 Share Posted November 25, 2008 The problem is that $row is not an object. How is $row set? Quote Link to comment https://forums.phpfreaks.com/topic/134259-joomla-help/#findComment-698939 Share on other sites More sharing options...
dennismonsewicz Posted November 25, 2008 Author Share Posted November 25, 2008 row is set like this: $row =& JTable::getInstance('phoneplan', 'Table'); Quote Link to comment https://forums.phpfreaks.com/topic/134259-joomla-help/#findComment-698945 Share on other sites More sharing options...
Mchl Posted November 25, 2008 Share Posted November 25, 2008 You might try doing var_dump on $row to see if it is an object after that (and of what class) Quote Link to comment https://forums.phpfreaks.com/topic/134259-joomla-help/#findComment-698957 Share on other sites More sharing options...
dennismonsewicz Posted November 25, 2008 Author Share Posted November 25, 2008 on $row i get this: bool(false) on $cid i get this: array(1) { [0]=> string(1) "2" } Quote Link to comment https://forums.phpfreaks.com/topic/134259-joomla-help/#findComment-698961 Share on other sites More sharing options...
Mchl Posted November 25, 2008 Share Posted November 25, 2008 on $row i get this: bool(false) And this means, something is wrong with how you're instantiating it. What exactly, I cannot help you. You should check if you use JTable::getInstance() properly. Quote Link to comment https://forums.phpfreaks.com/topic/134259-joomla-help/#findComment-698964 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.