Instagram提供Zend框架2

I'm trying to use a simple code to get my Instagram feed. I'm using Zend framework 2 with zend server (as a localhost).

I'm using the code given here.

I activated curl in my php.ini so I guess the problem would not come from here.

I just copied the code in my layout.php, in the footer part.

Here what it is saying :

Notice: Trying to get property of non-object in /usr/local/zend/apache2/htdocs/zend/module/Application/view/layout/layout.phtml on line 114

Warning: Invalid argument supplied for foreach() in /usr/local/zend/apache2/htdocs/zend/module/Application/view/layout/layout.phtml on line 114

Line 114 :

foreach ($result->data as $post){

See below the screenshot of the informations given by Zend server:

screenshot

and here the info given by var_dump($result) before the json_decode()

var_dump