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! 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? 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'); 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) 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" } 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. Link to comment https://forums.phpfreaks.com/topic/134259-joomla-help/#findComment-698964 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.