[Cs-content-commits] SF.net SVN: cs-content:[430] trunk/1.0/cs_siteConfig.class.php
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-08-12 15:10:30
|
Revision: 430
http://cs-content.svn.sourceforge.net/cs-content/?rev=430&view=rev
Author: crazedsanity
Date: 2009-08-12 15:10:23 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
Fix PHP warnings involving array values & such.
Modified Paths:
--------------
trunk/1.0/cs_siteConfig.class.php
Modified: trunk/1.0/cs_siteConfig.class.php
===================================================================
--- trunk/1.0/cs_siteConfig.class.php 2009-08-11 18:53:21 UTC (rev 429)
+++ trunk/1.0/cs_siteConfig.class.php 2009-08-12 15:10:23 UTC (rev 430)
@@ -178,7 +178,7 @@
unset($secData['type']);
- if(is_array($secData['attributes'])) {
+ if(isset($secData['attributes']) && is_array($secData['attributes'])) {
$sectionAttribs = $secData['attributes'];
unset($secData['attributes']);
@@ -196,10 +196,15 @@
foreach($secData as $itemName=>$itemValue) {
$attribs = array();
- if(is_array($itemValue['attributes'])) {
+ if(isset($itemValue['attributes']) && is_array($itemValue['attributes'])) {
$attribs = $itemValue['attributes'];
}
- $itemValue = $itemValue['value'];
+ if(isset($itemValue['value'])) {
+ $itemValue = $itemValue['value'];
+ }
+ else {
+ $itemValue = null;
+ }
if(preg_match("/{/", $itemValue)) {
$origVal = $itemValue;
@@ -239,7 +244,9 @@
$setVarIndex = $attribs['SETCONSTANTPREFIX'] ."-". $setVarIndex;
}
}
- define($setVarIndex, $itemValue);
+ if(!defined($setVarIndex)) {
+ define($setVarIndex, $itemValue);
+ }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|