Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Warning: Array_merge() [function.array-merge]: Argument #1 Is Not An Array In /home/babzonbo/public_html/admin/customers.php On Line 733


babzonboard

Recommended Posts

Hi I'm new to all of this so please forgive me if i sound like a complete donut.

when i click on customers in the oscommerce admin page i get this error

 

 

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/babzonbo/public_html/admin/customers.php on line 733

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/babzonbo/public_html/admin/customers.php on line 733

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/babzonbo/public_html/admin/customers.php on line 735

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/babzonbo/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/babzonbo/public_html/admin/includes/classes/object_info.php on line 18

 

 

I discovered this after doing a test purchase, it is also showingin my orders that the total number of orders is 0

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...

If you are using php version 5, then this might be the answer. It worked beautifully for me.

-------

OsCommerce Errors After PHP5 Upgrade

 

After upgrading a OsCommerce site to PHP5 the follow errors occurred when using the customer part of the admin section:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /catalog/admin/customers.php on line 782

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /catalog/admin/customers.php on line 784

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /catalog/admin/includes/classes/object_info.php on line 18

 

 

To eliminate thee array_merge() errors, edit the admin/customers.php file:

 

Find these lines:

$customer_info = array_merge($country, $info, $reviews);

$cInfo_array = array_merge($customers, $customer_info); 

 

 

and change them to:

$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);

$cInfo_array = array_merge((array)$customers, (array)$customer_info);

 

 

 

The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin.

 

All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

This works 100%. Recommended.

 

Cheers

Markeinoz

 

 

If you are using php version 5, then this might be the answer. It worked beautifully for me.

-------

OsCommerce Errors After PHP5 Upgrade

 

After upgrading a OsCommerce site to PHP5 the follow errors occurred when using the customer part of the admin section:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /catalog/admin/customers.php on line 782

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /catalog/admin/customers.php on line 784

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /catalog/admin/includes/classes/object_info.php on line 18

To eliminate thee array_merge() errors, edit the admin/customers.php file:

 

Find these lines:

$customer_info = array_merge($country, $info, $reviews);

$cInfo_array = array_merge($customers, $customer_info); 

and change them to:

$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);

$cInfo_array = array_merge((array)$customers, (array)$customer_info);

 

 

 

The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin.

 

All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx

Link to comment
Share on other sites

If you are using php version 5, then this might be the answer. It worked beautifully for me.

-------

Find these lines:

$customer_info = array_merge($country, $info, $reviews);

$cInfo_array = array_merge($customers, $customer_info); 

and change them to:

$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);

$cInfo_array = array_merge((array)$customers, (array)$customer_info);

 

 

THANK YOU!!!!!!!!!!!

Link to comment
Share on other sites

  • 2 weeks later...

also what could be happening (and what was happening to an older install i had) was this error:

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /catalog/admin/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in /catalog/admin/includes/classes/object_info.php on line 18

 

the above steps fixed this issue when a customer registered. But they did not fix the errors from showing up when the admin entered a customer via the "create account" interface.

 

to fix that, i had to find the following line in the admin/create_account_process.php

 

tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);

 

and add the following code right after it:

 

$address_id = tep_db_insert_id();

tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int)$address_id . "' where customers_id = '" . (int)$customer_id . "'");

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

I also am getting a similar error message, but my reviews:

 

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /home/brsgift/public_html/admin/reviews.php on line 215

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/brsgift/public_html/admin/reviews.php on line 216

 

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in /home/brsgift/public_html/admin/reviews.php on line 216

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/brsgift/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/brsgift/public_html/admin/includes/classes/object_info.php on line 18

 

While looking for a possible solution, I do not a file admin/create_account_process.php nowhere in the admin folder. I am using RC2a.

 

Thanks.

 

blr044

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I'm having the following error after the upgrade to PHP5. Can help me? Where should I make the changes to my codes? I can't manage to post new items to my categories now. :(

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/pingz/public_html/admin/categories.php on line 263

 

Warning: Cannot modify header information - headers already sent by (output started at /home/pingz/public_html/admin/categories.php:263) in /home/pingz/public_html/admin/includes/functions/general.php on line 22

 

Thanks a lot in advance!!!

Link to comment
Share on other sites

In file admin/reviews.php find:

 

$review_info = array_merge($reviews_text, $reviews_average, $products_name);
$rInfo_array = array_merge($reviews, $review_info, $products_image); 

 

and change it to:

 

$review_info = array_merge((array)$reviews_text, (array)$reviews_average, (array)$products_name);
$rInfo_array = array_merge((array)$reviews, (array)$review_info,
(array)$products_image);

Link to comment
Share on other sites

I'm trying to fix a problem in a website that someone else made. Always tricky!

 

This post was of great help to me, because it fixed the warnings on the screen after filling in a form and trying to post it.

Now I have still left the problem that the email that is supposed to be send after filling in the form is completely empty.

The titel & mailadres however, are correct.

 

I have no knowledge of PHP at all, but I assume it must be somewhere here in this function also ? (This is also the function where I added the (array)-solution from above)

 

function ddc_HandleRequest($parameters, $formTemplate, $mailTemplate, $confirmTemplate, $subjectStart, $fromField) {
if ($_SERVER['REQUEST_METHOD']=="POST" && isset($_POST['Verstuur_formulier'])) {
	$names = array_keys($parameters);
	foreach ($names as $name) {
		$bindings[$name] = htmlspecialchars($_POST[$name]);
	}
	$errors = ddc_CheckParameters($_POST, $parameters);
	$defaults = ddc_CreateRadioDefaults($_POST, $parameters);
	$bindings = array_merge((array)$errors, (array)$bindings, (array)$defaults);
	if (!$errors) {
		$postdata = ddc_FillTemplate($mailTemplate, $bindings);
		$maildata = "--boundary1234\r\nContent-Type: text/html; charset=iso-8859-1\r\n\r\n" . $postdata;
		$maildata .= ddc_AddAttachments($parameters, $_FILES, "--boundary1234");
		$maildata .= "\r\n--boundary1234--\r\n";
		ddc_createAndSendFormattedMail($fromField, $subjectStart . $_POST['naam'], $maildata);
		$postdata = ddc_FillTemplate($confirmTemplate, $bindings);
	} else {
		$postdata = ddc_FillTemplate($formTemplate, $bindings);
	}
	echo $postdata;
}
else {
	echo ddc_FillTemplate($formTemplate);
}	
}

 

Can someone give me a hint where to look?

 

Thanks!

Link to comment
Share on other sites

  • 6 months later...
  • 4 weeks later...

Very nice. I installed the 'simple registration' contribution and was getting the same errors in the admin>customers when selecting any customer that registered with only the simple registration fields. After editing the customers.php like it said above, everything is proper now.

 

Thanks again...peace

Link to comment
Share on other sites

  • 1 year later...

Hi Guys.

I have just recently had this issue of which this fix worked great but I have now found that all similar fields attributing to customer address info are also gone.

Including account_history.php, account_history_info.php on the catalog side and invoice.php and packing_slip.php on the admin side.

Any ideas on how to fix or what happened are greatly appreciated

Link to comment
Share on other sites

  • 3 weeks later...

Hi

i am having a similar error is there anyone with enought knowledge to diagnose this problem, thanks.

 

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/c/h/r/chrisaussie/html/admin/applications/forums/sources/classes/forums/class_forums.php on line 2192

 

Warning: Invalid argument supplied for foreach() in /home/content/c/h/r/chrisaussie/html/admin/applications/forums/sources/classes/forums/class_forums.php on line 2195

 

 

 

line 2192

$memberGroups = array_merge( $memberGroups, explode( ",", IPSText::cleanPermString( $t['mgroup_others'] ) ) );

 

 

 

line 2195

foreach( $memberGroups as $groupId )

Link to comment
Share on other sites

  • 1 month later...

If you are using php version 5, then this might be the answer. It worked beautifully for me.

-------

OsCommerce Errors After PHP5 Upgrade

 

After upgrading a OsCommerce site to PHP5 the follow errors occurred when using the customer part of the admin section:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /catalog/admin/customers.php on line 782

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /catalog/admin/customers.php on line 784

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /catalog/admin/includes/classes/object_info.php on line 18

 

 

To eliminate thee array_merge() errors, edit the admin/customers.php file:

 

Find these lines:

$customer_info = array_merge($country, $info, $reviews);

$cInfo_array = array_merge($customers, $customer_info); 

 

 

and change them to:

$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);

$cInfo_array = array_merge((array)$customers, (array)$customer_info);

 

 

 

The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin.

 

All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

If you are using php version 5, then this might be the answer. It worked beautifully for me.

-------

OsCommerce Errors After PHP5 Upgrade

 

After upgrading a OsCommerce site to PHP5 the follow errors occurred when using the customer part of the admin section:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /catalog/admin/customers.php on line 782

 

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /catalog/admin/customers.php on line 784

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /catalog/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /catalog/admin/includes/classes/object_info.php on line 18

 

 

To eliminate thee array_merge() errors, edit the admin/customers.php file:

 

Find these lines:

$customer_info = array_merge($country, $info, $reviews);

$cInfo_array = array_merge($customers, $customer_info); 

 

 

and change them to:

$customer_info = array_merge((array)$country, (array)$info, (array)$reviews);

$cInfo_array = array_merge((array)$customers, (array)$customer_info);

 

 

 

The last two errors were experienced when editing bogus customer entries which did not have all the required information (First Name, Last Name, etc.). We just purged these from the MySQL database via phpMyAdmin.

 

All thanks goes to http://fstcs.net/blogs/ryansuzuki/archive/...p5-upgrade.aspx

 

 

Thanks ,, Works for me also

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...