[Cs-content-commits] SF.net SVN: cs-content:[374] trunk/1.0/cs_genericPage.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-05-05 20:41:10
|
Revision: 374
http://cs-content.svn.sourceforge.net/cs-content/?rev=374&view=rev
Author: crazedsanity
Date: 2009-05-05 20:41:04 +0000 (Tue, 05 May 2009)
Log Message:
-----------
Minor fix to avoid errors about undefined array indexes.
/cs_genericPage.class.php:
* print_page():
-- check if the index exists when tallying unhandledVars: set when it
doesn't exists, increment when it does.
-- NOTE: technically, the old way was just fine, but some web apps
set error reporting very high, so nearly everything is printed.
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-05-01 19:24:49 UTC (rev 373)
+++ trunk/1.0/cs_genericPage.class.php 2009-05-05 20:41:04 UTC (rev 374)
@@ -292,7 +292,12 @@
if(!isset($this->templateVars[$str2]) && $stripUndefVars) {
//TODO: set an internal pointer or something to use here, so they can see what was missed.
$this->templateObj->varvals['out'] = str_replace($str, '', $this->templateObj->varvals['out']);
- $this->unhandledVars[$str2]++;
+ if(isset($this->unhandledVars[$str2])) {
+ $this->unhandledVars[$str2]++;
+ }
+ else {
+ $this->unhandledVars[$str2] = 1;
+ }
}
}
$this->templateObj->parse("out", "out");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|