WordPress.org

Ready to get started?Download WordPress

Forums

Clicky by Yoast
Help: Invalid argument supplied (5 posts)

  1. multimule
    Member
    Posted 2 years ago #

    Hi there.
    I keep getting the following error in my error_log
    PHP Warning: Invalid argument supplied for foreach() in /home/USERNAMEHERE/public_html/wp-content/plugins/clicky/clicky.php on line 272

    Any ideas?

    http://wordpress.org/extend/plugins/clicky/

  2. styks1987
    Member
    Posted 2 years ago #

    I am getting the same error....

  3. styks1987
    Member
    Posted 2 years ago #

    This looks like it is happening in conjunction with their admin bar implementation. I fixed it by adding a conditional just before the foreach loop. My guess is that the remote get does not return anything.

    Line 272 in the clicky.php file found in /wp-content/plugins/clicky/ directory.

    if(is_array($xml->type->date)){
    	foreach($xml->type->date as $value)
    	{
    	   foreach($xml->type->date[$i]->item->value as $art)//nested loop for multiple values in tag
    									{
    
    									$data=(int)($xml->type->date[$i]->item->value[$j]);//$i and $j is used to iterate multiples of both tags respectively
    									array_push($values,$data);
    									$j=$j+1;
    									$k++;
    									if ($k == 48)
    										break 2;
    									}
    							$j=0; //so that in next item it starts from 0(zero)
    							$i++;
    					}
    				}
  4. multimule
    Member
    Posted 2 years ago #

    Thanks styks1987

    I have, made the edits like you have at Line 272 and i will see what happens over the next few days.
    Touch wood, i will get not more errors in the error log.

    Thanks for looking into it, i did as on the official clicky forums and i never got a reply back from there support team :(

    Thanks once again.

  5. sadie.harris@virgin.net
    Member
    Posted 1 year ago #

    I'm getting the same error message too... thanks for the tip :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags