php error: Indirect modification of overloaded property class::$data has no effect
<p>I have this sample code from my default function of the controller class.</p>

<pre><code>$this-&gt;data['heading_title']= $this-&gt;language-&gt;get('heading_title');

$this-&gt;data['text_enabled'] = $this-&gt;language-&gt;get('text_enabled');
</code></pre>

<p>when i run the code it just keeps on giving me this error</p>

<blockquote>
  <p>Indirect modification of overloaded property
  ControllerModuleHelloworld::$data has no effect in /the/path/of/the/file</p>
</blockquote>

<p>When looking at some of the previous answers here, it seems that mostly is about calling by reference. but whenever I try it using this code</p>

<pre><code>&amp;_set( $this-&gt;data['heading_title'], $this-&gt;language-&gt;get('heading_title') );
</code></pre>

<p>it returns this error:</p>

<blockquote>
  <p>Parse error: syntax error, unexpected '&amp;' in /the/path/of/the/file.php on line 23</p>
</blockquote>

<p>Can you please assist me in order to know what's wrong and how to fix the bug.</p>