title: Access to undeclared static property: Config::$config["modules"] - even though it is defined and has an element named modules
body: <p>How come I get the above error when calling <code>Config::get('modules');</code> on the following class?</p>
  
  <p>The function works fine if I just return <code>static::$config</code> however when I try to return it's elements I get the error, even though it's definitely defined.</p>
  
  <pre><code>class Config
  {
      private static $config = NULL;
      private static $initialized = FALSE;
  
      public static function _init()
      {
          if(self::$initialized == TRUE)
          {
              return;
          }
          static::$config = $GLOBALS['config'];
          unset($GLOBALS['config']);
  
          var_dump(static::$config);
          static::$initialized = TRUE;
      }
  
      public static function get($property = '')
      {
          self::_init();
          var_dump(static::$config);
  
          $parts = explode('.', $property);
  
          $path = 'config';
  
          foreach($parts as $part)
          {
              $path .= '["'.$part.'"]';
          }
  
          return static::$$path;
  
      }
  }
  </code></pre>
  
  <p>output of var dumps in functions and error.</p>
  
  <pre><code>array(3) {
    ["APP_VERSION"]=&gt;
    string(5) "0.0.1"
    ["database"]=&gt;
    array(3) {
      ["dsn"]=&gt;
      string(32) "mysql:host=localhost;dbname=test"
      ["user"]=&gt;
      string(4) "root"
      ["pass"]=&gt;
      string(0) ""
    }
    ["modules"]=&gt;
    array(0) {
    }
  }
  array(3) {
    ["APP_VERSION"]=&gt;
    string(5) "0.0.1"
    ["database"]=&gt;
    array(3) {
      ["dsn"]=&gt;
      string(32) "mysql:host=localhost;dbname=test"
      ["user"]=&gt;
      string(4) "root"
      ["pass"]=&gt;
      string(0) ""
    }
    ["modules"]=&gt;
    array(0) {
    }
  }
  
  Fatal error: Access to undeclared static property: Config::$config["modules"] in C:\xampp\htdocs\project\system\classes\Config.php on line 37
  </code></pre>