[Cs-content-commits] SF.net SVN: cs-content:[454] trunk/1.0/cs_genericPage.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
From: <cra...@us...> - 2009-08-24 16:53:00
|
Revision: 454 http://cs-content.svn.sourceforge.net/cs-content/?rev=454&view=rev Author: crazedsanity Date: 2009-08-24 16:52:54 +0000 (Mon, 24 Aug 2009) Log Message: ----------- Fix for PHP warnings. /cs_genericPage.class.php: * strip_undef_template_vars(): -- use isset() when checking if the given $str2 value exists in the templateVars array. -- initialize indexes in the $unhandled array as 0 if they're not set before incrementing them. Modified Paths: -------------- trunk/1.0/cs_genericPage.class.php Modified: trunk/1.0/cs_genericPage.class.php =================================================================== --- trunk/1.0/cs_genericPage.class.php 2009-08-20 20:34:59 UTC (rev 453) +++ trunk/1.0/cs_genericPage.class.php 2009-08-24 16:52:54 UTC (rev 454) @@ -621,9 +621,12 @@ foreach($tags as $key=>$str) { $str2 = str_replace("{", "", $str); $str2 = str_replace("}", "", $str2); - if(!$this->templateVars[$str2]) { + if(!isset($this->templateVars[$str2])) { //TODO: set an internal pointer or something to use here, so they can see what was missed. if(is_array($unhandled)) { + if(!isset($unhandled[$str2])) { + $unhandled[$str2]=0; + } $unhandled[$str2]++; } $templateContents = str_replace($str, '', $templateContents); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |