Author: bhofmann
Date: Fri Aug 20 07:25:48 2010
New Revision: 987392

URL: http://svn.apache.org/viewvc?rev=987392&view=rev
Log:
changed config loading from include_once to require 

this circumvents some issues we had on our production servers, but does not 
introduce any performance problems, since these requires are only called once 
if the config has not been initialized yet

Modified:
    shindig/trunk/php/src/common/Config.php

Modified: shindig/trunk/php/src/common/Config.php
URL: 
http://svn.apache.org/viewvc/shindig/trunk/php/src/common/Config.php?rev=987392&r1=987391&r2=987392&view=diff
==============================================================================
--- shindig/trunk/php/src/common/Config.php (original)
+++ shindig/trunk/php/src/common/Config.php Fri Aug 20 07:25:48 2010
@@ -32,14 +32,14 @@ class Config {
     global $shindigConfig;
     if (! self::$config) {
       // load default configuration
-      include_once realpath(dirname(__FILE__) . "/../../config") . 
'/container.php';
+      require realpath(dirname(__FILE__) . "/../../config") . '/container.php';
       self::$config = $shindigConfig;
       if ($local) {
         $localConfigPath = realpath(dirname(__FILE__) . "/../../config") . '/' 
. $local . '.php';
         if (file_exists($localConfigPath)) {
           // include local.php if it exists and merge the config arrays.
           // the second array values overwrites the first one's
-          include_once $localConfigPath;
+          require $localConfigPath;
           self::$config = array_merge(self::$config, $shindigConfig);
         }
       }


Reply via email to