__get error in php 5.3 indirect modification
<p>Hello i'm having some trouble with __get __set in php 5.3 it seems that i have an error there.. already googled about it and seems it's a change of behaviour since php 5 but i didn't find a solution that would work :-(</p>

<pre><code>$config['url']['uri'] = $request-&gt;uri();
</code></pre>

<p>=></p>

<pre><code>Notice: Indirect modification of overloaded element of Library\Config\Config has no effect in subdomains/prod/index.php on line 33



use \ArrayObject;
use \ArrayAccess;
use \Countable;
use \IteratorAggregate;
use \ArrayIterator;
use \Twelve\SingletonPattern\LazySingleton;
use \Twelve\SingletonPattern\Interfaces\ILazySingleton;

/**
 *  Singleton With Configuration Info
 */
class Config extends ArrayObject implements ArrayAccess, Countable, IteratorAggregate, ILazySingleton
{
    /**
     *  Instance Var
     *  @var Config
     */
    protected static $_instance = null;

    /**
     * Stores FileName
     * @var Config
     */
    protected static $_configFile = '';

    /**
     * Config Settings Array
     * @var Config
     */
    protected $_settings = array();

    public static function getInstance(){
        return LazySingleton::getInstance(__CLASS__);
    }

    /**
     *  Set the Config File Path
     */
    public static function setFile($filePath)
    {
        static::$_configFile = $filePath;
    }

    public function __construct()
    {
        LazySingleton::validate(__CLASS__);
        // Allow accessing properties as either array keys or object properties:
            parent::__construct($this-&gt;_settings, ArrayObject::ARRAY_AS_PROPS);
        $values = include(static::$_configFile);
        if(is_array($values))
        {
            $this-&gt;_settings = $values;
        }
    }

    /**
     * Prevent Cloning
     */
    public function __clone()
    {
        trigger_error('Clone is not allowed.', E_USER_ERROR);

        // No Cloning Allowed
    }

    /**
     *  Returns the Number of Elements Inside the Config File
     *  @var Config
     *  @return Integer Number of Elements Inside Config
     */
    public function count()
    {
        return sizeof($this-&gt;_settings);
    }

    /**
     * Check if a Given Key Exists
     * @var Config
     * @param mixed $offset Key of Item to Check
     * @return Boolean True if Key Exists, False Otherwise
     */
    public function offsetExists($offset)
    {
        return key_exists($offset, $this-&gt;_settings);
    }

    /**
     * Retrieve the Value of a Given Key
     * @param mixed $offset Key of Item to Fetch
     * @return mixed Value of the Matched Element
     */
    public function offsetGet($offset)
    {
        return $this-&gt;_settings[$offset];
    }

    /**
     * Assign a new Value to a Key
     * @param mixed $offset Key of the Element to Set
     * @param mixed $value Value to Assign
     */
    public function offsetSet($offset, $value)
    {
        $this-&gt;_settings[$offset] = $value;
    }

    /**
     * Remove an Item from the Config
     * @param mixed $offset Key of the Element to Remove
     */
    public function offsetUnset($offset)
    {
        unset($this-&gt;_settings[$offset]);
    }

    /**
     * Retrieve an Iterator for Config Values
     * @return Iterator Iterator of Config Values
     */
    public function getIterator()
    {
        return new ArrayIterator($this-&gt;_settings);
    }

    /**
     *  Enables to Set Values Using the Object Notation i.e $config-&gt;myValue = 'Something';
     */
    public function __set($key, $value)
    {
        (array) $this-&gt;_settings[$key] = $value;
    }

    /**
     * Enables to Get Values using the Object Notation i.e $config-&gt;myValue;
     */

    public function &amp;__get($key)
    {
        return $this-&gt;_settings[$key];
    }

    public function __isset($key)
    {
        return isset($this-&gt;_settings[$key]);
    }
}
</code></pre>

<p>New Edit:</p>

<pre><code>parent::__construct($this-&gt;_settings, ArrayObject::ARRAY_AS_PROPS);
</code></pre>
