![]() |
Call-time pass-by-reference has been depricated - 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: Call-time pass-by-reference has been depricated (/showthread.php?tid=41103) |
Call-time pass-by-reference has been depricated - El Forum - 04-28-2011 [eluser]Azafar[/eluser] Hi friends, I am using smarty parser class but it is throwing the following error. Call-time pass-by-reference has been depricated. I have php 5.3. Please guide me how to fix that error cause i must have to integrate smarty templates with my CI as well as I have to keep the default view mode. I mean i have to use both kinds of views smarty and CI default. Regards... Call-time pass-by-reference has been depricated - El Forum - 04-28-2011 [eluser]WanWizard[/eluser] What is generating the error? Smarty code? If you're still using Smarty2, your upgrade to 3 is overdue (which does support PHP5 fully). Note that this means changes to existing templates, as the syntax has changed. If you want to keep using Smarty2 you can only fix it by code modifications. This might be a complex task, because you're not only facing the problem of this error message (which is not that difficult, as all objects are now passed by reference), but the fact that pre PHP5, when you passed an object to a method, PHP would made a copy. If the code used this "feature" to make changes to the object that should stay local within the method, you're in deep trouble since now the global object will be changed to. So you need to find these methods, and use clone() to make a copy manually. Good luck. Call-time pass-by-reference has been depricated - El Forum - 05-20-2011 [eluser]Azafar[/eluser] Thanks wanwizard, My problem has been resolved. I just modified the library file of smarty according to php 5 and my problem got resolved. |