Re: [SMARTY] Security

From: Date: Mon, 20 Jan 2003 19:50:30 +0000
Subject: Re: [SMARTY] Security
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7278@lists.php.net to get a copy of this message
On 20 Jan 2003 at 12:04, Monte Ohrt wrote: > >By the way, while testing this PHP told me that "the variable results is > >not defined" - it is used as a return value in the > >_generate_debug_output() method on line 785 - please check that! > > > > > > > Not sure what that error is, please give the CVS version a try and see > if it still happens. > > Monte The function is not changed in CVS. I've examined the code and found out that its a minor issue as the PHP notice only appears if there was a problem processing the debug template - like the (former) security problem we are just talking about. Here comes the code (taken from cvs.php.net): ========================= if ($this->_process_template($this->debug_tpl, $compile_path)) { ob_start(); include($compile_path); $results = ob_get_contents(); ob_end_clean(); } // ... return $results; ========================= $results is only set if $this->_process_template() returns true. If there is a problem with the debug template, PHP is complaining that $results is not defined when trying to return it. If you are perfectionist (I think we should be), you may set $results to an empty string above the if-clause to avoid the PHP notice. -- Ferdinand Beyer <fbeyer@clickhand.de>

« previous php.smarty.general (#7278) next »