title: PHP - Fatal error: Unsupported operand types
body: <p>I keep getting the following error and I was wondering on how to fix?</p>
  
  <pre><code>Fatal error: Unsupported operand types in C:\wamp\www\tuto\core\Controller.php on line 23
  </code></pre>
  
  <p>Here is line 23.</p>
  
  <pre><code>$this-&gt;vars +=  $key;
  </code></pre>
  
  <p>Here is the full code below.</p>
  
  <pre><code>public function set($key,$value=null){
  
      if(is_array($key)){
  
          $this-&gt;vars +=  $key;
  
      }else{
          $this-&gt;vars[$key]= $value;
      }
  }
  </code></pre>