title: In what way is my array index an 'Illegal string offset'?
body: <p>When "future-proofing" code by testing it on PHP 5.4, I get a warning I don't understand.</p>
  
  <pre><code>function __clone() {
    $this-&gt;changed = TRUE;
    foreach ($this-&gt;conditions as $key =&gt; $condition) {
      if (
      $condition['field']
      instanceOf QueryConditionInterface) {
        $this-&gt;conditions[$key]['field'] = clone($condition['field']);
      }
    }
  }
  </code></pre>
  
  <p>I broke out <code>$condition['field']</code> into its own row to reduce the amount of code to focus on. About that specific line, PHP has this to say</p>
  
  <blockquote>
    <p>Warning: Illegal string offset <code>'field'</code> in <code>DatabaseCondition-&gt;__clone()</code></p>
  </blockquote>
  
  <p>And I just can't see how 'field', is an illegal string offset. I'm guessing that I'm just missing something obvious, but if the community can't find a problem, I'll file a bug report.</p>
  
  <p>I interpret the warning as "<em>Under no circumstances is 'field' a valid key</em>". This error would have made sense if I had tried to us for example an array as a key.</p>