title: toArray give error in cakephp 3.0
body: <p>I want to get all product related to 'products' table. But when $product_key blank
  ,the code will give errors. I want the blank array without elements. My code in the controller like that.</p>
  
  <pre><code>$ProductTable        = TableRegistry::get('products');    
  $ProductData = $ProductTable-&gt;find('All') -&gt;where(['product_key' =&gt; $product_key]) -&gt;first() -&gt;toArray();
  </code></pre>
  
  <hr>