"Trying to get property of non-object" for image_get_info I have the following code:

  $imageinfo = image_get_info($newfile-&gt;uri, $toolkit = FALSE);

  $newrecord = array(
     blah blah blah
     'width' =&gt; $imageinfo-&gt;width,
     'height' =&gt; $imageinfo-&gt;height
    );


The width and height lines get the "Trying to get property of non-object" error.

If I print the contents of the $imageinfo array, it's this:  

Array  
(  
    [width] =&gt; 630  
    [height] =&gt; 315  
    [extension] =&gt; jpg  
    [mime_type] =&gt; image/jpeg  
    [file_size] =&gt; 30334  
)


I must be doing something stupid here.  What is it?
Always, always read the documentation first:


  Return Value
  
  FALSE, if the file could not be found or is not an image. Otherwise, a keyed array containing information about the image:


Emphasis mine.