disqus/disqus-php — Issue #11: PHP Notice:  Trying to get property of non-object in disqus-php/disqusapi/disqusapi.php on line 120
Author: ceefour
Created: 2011-12-16 11:27:28+00:00
State: open

PHP Notice: Trying to get property of non-object in /home/ceefour/git/bippo-labs/disqus-sandbox/disqus-php/disqusapi/disqusapi.php on line 120

The following code:

require 'disqus-php/disqusapi/disqusapi.php';

$disqus = new DisqusAPI(DISQUS_SECRET_KEY);
$threads = $disqus->trends->listThreads();
var_dump($threads);

outputs this notice :

PHP Notice: Trying to get property of non-object in disqus-php/disqusapi/disqusapi.php on line 120

and the result is :

NULL

However, checking using curl, the following works:

curl 'https://disqus.com/api/3.0/trends/listThreads.json?api_secret=[[SECRET_KEY]]'

and outputs the trending threads in JSON format.