Webmastersite.net
Register Log In

Search multipage problem
array_merge() Argument #1 is not an array

Comments on Search multipage problem

Philarmon
Beginner

Usergroup: Customer
Joined: Feb 19, 2005

Total Topics: 4
Total Comments: 8
Posted Mar 03, 2005 - 2:21 PM:

Hi !

When i do a search and have multiple pages and then click on one of the next pages, i am always getting the following error:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\Programme\apachefriends\xampp\htdocs\jewelry\search.php on line 44

Warning: Invalid argument supplied for foreach() in C:\Programme\apachefriends\xampp\htdocs\jewelry\search.php on line 45

The same message comes when i click on the number of links or comments in the user profile (then a search for all comments should come up)

Any help would be greatly appreciated smiling face

Thank you !
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 04, 2005 - 2:42 PM:

Odd that it doesn't show up on my PHP 4.3.10 sites. Perhaps it's a PHP 5 thing since you're using xampp (which I also have, but I haven't done multipage searches on localhost with it).

In search.php change
 array_merge($postvarslist, $getvarslist);

to
 if (is_array($postvarslist)) $varslist = array_merge($postvarslist, $getvarslist);
else $varslist = $getvarslist;
Philarmon
Beginner

Usergroup: Customer
Joined: Feb 19, 2005

Total Topics: 4
Total Comments: 8
Posted Mar 07, 2005 - 8:18 AM:

Yep, that did the job. Thanks, Paul - you rocks ! wink
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.