Undefined variable
-
Hello !
I’m using successfully your plugin in several websites, but I have a problem with one of them … When i go to the “hnow my ranking” report, i get this error message :
Notice: Undefined variable: label in /home/mywebsite database/www/wp-content/plugins/google-rank-tracker/includes/KnowMyRankingsAdmin.php on line 867
this message displays under each keyword I asked to check, and results are not showing, it just keeps searching infinitely.Here is the part of the code that is in cause :
public function position( $keyword ) { if ( isset ( $keyword['last_7day'] ) && $keyword['last_7day'] != 0 ) { $position = $keyword['last_7day'] - $keyword['current_rank']; if ( $position > 0 ) { $class = "up"; $label = "Up $position"; } if ( $position < 0 ) { $class = "down"; $label = "Down " . abs( $position ); } if ( $position == 0 ) { $label = "No change"; } echo "<div class=\"position $class\"> <span class=\"triangle\"></span> <span class=\"desc\">$label</span> " .__( "since last week", "know-my-rankings" ). "</div>"; } else echo "<div class=\"position\"> <span class=\"desc\">$label</span> </div>"; }
The 867 line is the last one :
<span class=\"desc\">$label</span> </div>";
Do you have an idea what the problem could be ? thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Undefined variable’ is closed to new replies.