disqus / disqus-php

Disqus API bindings for PHP
http://disqus.com/api/
Apache License 2.0
149 stars 73 forks source link

PHP Notice: Undefined offset: 0 in disqus-php/disqusapi/disqusapi.php on line 79 #10

Open ceefour opened 12 years ago

ceefour commented 12 years ago

Running the code in the README :

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

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

outputs a notice message :

PHP Notice:  Undefined offset: 0 in disqus-php/disqusapi/disqusapi.php on line 79
sebilasse commented 12 years ago

same here

ghost commented 10 years ago

I've found that this happens when testing on localhost or on a domain that isn't approved in the Disqus settings.

Once I moved to an approved domain, this error disappeared.

Thought this might be useful for anyone else that encounters this.

samratshamim commented 8 years ago

I have tried the same with Laravel. I have tested in localhost and also in live server. In both cases it returns:

Undefined offset: 0

Is there anyone to help me with this problem?