disqus-php icon indicating copy to clipboard operation
disqus-php copied to clipboard

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

Open ceefour opened this issue 13 years ago • 3 comments

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

ceefour avatar Dec 16 '11 11:12 ceefour

same here

sebilasse avatar May 24 '12 12:05 sebilasse

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.

ghost avatar May 14 '14 14:05 ghost

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?

samratshamim avatar Nov 05 '15 11:11 samratshamim