[Cs-content-commits] SF.net SVN: cs-content:[470] trunk/1.0
PHP Templating & Includes System
Brought to you by:
crazedsanity
|
From: <cra...@us...> - 2009-11-11 01:06:26
|
Revision: 470
http://cs-content.svn.sourceforge.net/cs-content/?rev=470&view=rev
Author: crazedsanity
Date: 2009-11-11 01:06:10 +0000 (Wed, 11 Nov 2009)
Log Message:
-----------
Minor fixes for PHP warnings/notices.
/cs_genericPage.class.php:
* __get():
-- suppress notices/warnings about retrieving properties that don't
exist.
/cs_session.class.php:
* __construct():
-- suppress notices/warnings if the session is already active.
/tests/testOfCSContent.php:
* __construct():
-- only define TEST_FILESDIR if it isn't already defined to avoid
warnings/notices.
Modified Paths:
--------------
trunk/1.0/cs_genericPage.class.php
trunk/1.0/cs_session.class.php
trunk/1.0/tests/testOfCSContent.php
Modified: trunk/1.0/cs_genericPage.class.php
===================================================================
--- trunk/1.0/cs_genericPage.class.php 2009-10-30 02:40:26 UTC (rev 469)
+++ trunk/1.0/cs_genericPage.class.php 2009-11-11 01:06:10 UTC (rev 470)
@@ -680,7 +680,7 @@
* Magic PHP method for retrieving the values of private/protected vars.
*/
public function __get($var) {
- return($this->$var);
+ return(@$this->$var);
}//end __get()
//-------------------------------------------------------------------------
Modified: trunk/1.0/cs_session.class.php
===================================================================
--- trunk/1.0/cs_session.class.php 2009-10-30 02:40:26 UTC (rev 469)
+++ trunk/1.0/cs_session.class.php 2009-11-11 01:06:10 UTC (rev 470)
@@ -30,7 +30,7 @@
}
//now actually create the session.
- session_start();
+ @session_start();
}
//check if there's a uid in the session already.
Modified: trunk/1.0/tests/testOfCSContent.php
===================================================================
--- trunk/1.0/tests/testOfCSContent.php 2009-10-30 02:40:26 UTC (rev 469)
+++ trunk/1.0/tests/testOfCSContent.php 2009-11-11 01:06:10 UTC (rev 470)
@@ -24,7 +24,9 @@
$this->gfObj->debugPrintOpt=1;
$filesDir = dirname(__FILE__) ."/files";
- define('TEST_FILESDIR', $filesDir);
+ if(!defined('TEST_FILESDIR')) {
+ define('TEST_FILESDIR', $filesDir);
+ }
}//end __construct()
//-------------------------------------------------------------------------
@@ -68,7 +70,7 @@
foreach($sc->get_valid_sections() as $section) {
$sectionData = $sc->get_section($section);
foreach($sectionData as $name=>$value) {
- if(is_array($value['attributes'])) {
+ if(isset($value['attributes']) && is_array($value['attributes'])) {
if(isset($value['attributes']['SETGLOBAL'])) {
$setAsGlobals[$name] = $value['value'];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|