Problems with WP plugin error message
I recently installed a WP plug in called widlink but it showed on my log 2 error message as follows:
Warning: Invalid argument supplied for foreach() in /home2/imjason/public_html/wp-content/plugins/widlink.php on line 60
Warning: Invalid argument supplied for foreach() in /home2/imjason/public_html/wp-content/plugins/widlink.php on line 72
The 2 "foreach" line are as in red as follows:
$q = @file($remoteURL);$a=array();$b=array();
$l = @file($myLinksUrl);
//removing $ignore from $q
$new_q=array();
foreach($q as $_u)
{
$_p=explode("|", $_u);
$_name = trim($_p[0]);
if( ($_name) && ($_name != $ignore) )
$new_q[]=$_u;
}
$q=$new_q; unset($new_q);
$n=count($q);
//removing $ignore from $l
$new_l=array();
foreach($l as $_u)
{
$_p=explode("|", $_u);
$_name = trim($_p[0]);
if( ($_name) && ($_name != $ignore) )
$new_l[]=$_u;
}
$l=$new_l; unset($new_l);
$mylinks_count=count($l);
srand(time());
$addmylink = (empty($l)) ? "" : $l[array_rand($l)];
if(empty($l)) {
if(empty($q)) {
echo "";
echo $after_widget;
return;
}
}
I am not a programmer, please advise .
Cheers
Jason Ser
Eight bytes walk into a bar. The bartender asks, âCan I get you anything?â
âYeah,â reply the bytes. âMake us a double.â
Here is where I work now: www.LohasDigital.com