Author: lindner
Date: Fri Jul 23 23:54:00 2010
New Revision: 967311

URL: http://svn.apache.org/viewvc?rev=967311&view=rev
Log:
SHINDIG-1391 | Patch from Bastian Hofmann | Small improvements in Config class

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=967311&r1=967310&r2=967311&view=diff
==============================================================================
--- shindig/trunk/php/src/common/Config.php (original)
+++ shindig/trunk/php/src/common/Config.php Fri Jul 23 23:54:00 2010
@@ -32,9 +32,9 @@ class Config {
     global $shindigConfig;
     if (! self::$config) {
       // load default configuration
-      include_once 'config/container.php';
+      include_once realpath(dirname(__FILE__) . "/../../config") . 
'/container.php';
       self::$config = $shindigConfig;
-      $localConfigPath = realpath(dirname(__FILE__) . 
"/../../config/local.php");
+      $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
@@ -61,7 +61,7 @@ class Config {
     if (isset(self::$config[$key])) {
       return self::$config[$key];
     } else {
-      throw new ConfigException("Invalid Config Key");
+      throw new ConfigException("Invalid Config Key " . $key);
     }
   }
 


Reply via email to