Strange "trying to get property of non-object" error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Strange "trying to get property of non-object" error (/showthread.php?tid=26272) |
Strange "trying to get property of non-object" error - El Forum - 01-10-2010 [eluser]Loquela[/eluser] The query below seems to work fine, but when I print the result it always throws TWO "Trying to get property of non-object" errors before printing the rows out! Any ideas why? Code: function menu_topics($data) Code: <?php foreach($topics as $r): ?> Strange "trying to get property of non-object" error - El Forum - 01-10-2010 [eluser]Loquela[/eluser] If it helps a var_dump of the object $topics gives: Code: array(3) { Strange "trying to get property of non-object" error - El Forum - 01-10-2010 [eluser]Loquela[/eluser] Sorted. I was mixing my variables and objects up! |