Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TAG search error
23-08-2012, 12:18 AM (This post was last modified: 23-08-2012 12:34 AM by willemb.)
Post: #1
TAG search error
When i press on a tag then i will go to a url like http://linkert.nl/?option=tag&tag=restroom+bathroom

When i look on tags then i will get keeping the message :
Warning: shuffle() expects parameter 1 to be array, null given in /home/promotie/domains/linkert.nl/public_html/include/functions.php on line 2040

Warning: array_slice() expects parameter 1 to be array, null given in /home/promotie/domains/linkert.nl/public_html/include/functions.php on line 2041

Warning: Invalid argument supplied for foreach() in /home/promotie/domains/linkert.nl/public_html/include/functions.php on line 2043

Please how to solf that ?

Its got somethin to do with this code.

shuffle($kelimeler_arr);
$kelimeler_arr = array_slice($kelimeler_arr, 0, 5);

foreach($kelimeler_arr as $deger) {
$kelimeler=$kelimeler."<br>".$deger;
}

I removed it out of the script and the error is gone
Find all posts by this user
Quote this message in a reply
23-08-2012, 05:48 PM (This post was last modified: 23-08-2012 05:49 PM by admin.)
Post: #2
RE: TAG search error
you can also put some code as below before shuffle($kelimeler_arr);


PHP Code:
if (is_array($kelimeler_arr)==false) {return "";}

shuffle($kelimeler_arr);

.......... 
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: