CodeIgniter Forums
PHP magic __set() causes fatal 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: PHP magic __set() causes fatal error (/showthread.php?tid=15435)



PHP magic __set() causes fatal error - El Forum - 02-04-2009

[eluser]Unknown[/eluser]
Hello forum folks,

I seem to be having trouble using the __set() magic function in models. Whenever I load a model, which has the magic __set function defined in it, I get the following notice and fatal error. I'm running CI 1.7.0, PHP 5.2.4, Apache (version unknown).

Quote:A PHP Error was encountered

Severity: Notice

Message: Indirect modification of overloaded property Mymodelname::$_ci_scaffolding has no effect

Filename: libraries/Model.php

Line Number: 69
Quote:Fatal error: Cannot assign by reference to overloaded object in /home/foodomc/public_html/olemus/sys/libraries/Model.php on line 69

I'm not able to figure out by myself what is causing this. It must be my mistake, since I didn't find anyone else asking the same questions. Any help is much appreciated!

BR,
CodeIgniter rookie


PHP magic __set() causes fatal error - El Forum - 04-01-2009

[eluser]echadwickb[/eluser]
Had the same exact problem. This post helped:

http://ellislab.com/forums/viewthread/61729/