Re: [SMARTY-DEV] problems with PHP5

From: Date: Sat, 21 Jun 2003 13:37:07 +0000
Subject: Re: [SMARTY-DEV] problems with PHP5
References: 1 2 3 4 5  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1661@lists.php.net to get a copy of this message
On Sat, 21 Jun 2003 15:19:24 +0200, Messju Mohr wrote (in message <20030621131924.GW5296@pharao.lammfellpuschen.de>): > but i agree that we should change $this to $smarty where it does no harm. i would say that is one prime rule in oop php, not name a variable $this > > On Sat, Jun 21, 2003 at 02:58:51PM +0200, messju mohr wrote: >> On Sat, Jun 21, 2003 at 02:48:37PM +0200, Terje Torkelsen wrote: >>> better to be prepared i would say.. >> >> you cannot prepare for an environment that changes each and every day >> like php5 imho. it changed alot yeah, but some of the important rules, and error checkings should count for php4 too, like $this >> >>> but thats not the issue. this is as easy >>> as counting to 2 actual. heres what i wrote to fix it (notice how EASY it >>> was): >>> >>> cd <smarty_dir>/core >>> sed 's/this/smarty/g' -i *.php >>> cd .. >>> cd plugins >>> sed 's/this/smarty/g' -i *.php >>> >>> wow! this fixed it.. >> >> but broke other things. try to use {include file=...} with your so >> easily patched version. as i dont use the {include file=...} in my script i dont care much about that it broken thou (there are probably other that dont work eather). my scripts ran fine after my "patch" so thats fine for me for the moment. >> >>> that $class = new $classname; bug is php5s problem, and >>> will sooner or later get fixed by them.. soon i hope.. >>> >>> Terje >>> >>> >>> On Sat, 21 Jun 2003 14:35:46 +0200, Messju Mohr wrote >>> (in message <20030621123546.GT5296@pharao.lammfellpuschen.de>): >>> >>>> On Sat, Jun 21, 2003 at 12:03:17PM +0200, Terje Torkelsen wrote: >>>>> seems like the latest smarty CVS wont work as expected with PHP5-CVS.. >>>>> besides from the problem that PHP5 have a bug with using: >>>>> >>>>> $class = new $classname; >>>>> >>>>> i also get an fatal error in the core files that says >>>>> >>>>> Fatal error : Using $this when not in object context in .... >>>>> >>>>> so for compatible issus i think the definition of $this in the >>>>> functions >>>>> should be changed, not good using $this anyway >>>> >>>> unfortunately this is not easy, if possible at all in functions like >>>> smarty_core_smarty_include(). i think it's far to early to try to >>>> support php5 at the moment. let's wait till php5 stabilizes, this will >>>> save us a lot of useless work. >>>> >>> >>> >>> >>> -- >>> Smarty Development Mailing List (http://smarty.php.net/) >>> To unsubscribe, visit: http://www.php.net/unsub.php >> >> -- >> Smarty Development Mailing List (http://smarty.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.dev (#1661) next »