[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

osCommerce Warning: array_merge() error fix

This tutorial will show you how to fix the following warning at your admin panel:
Warning: array_merge()… It usually looks like:

1. First of all, you need to look at the file mentioned file in the warning message. As you can see in the example it is:


Open the mentioned file and find the following text (there can be several lines with this text):


In the example file customers.php you will find the following code:

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

2. You need to update all the code with array_merge. Add (array) text before each of $ symbols. So, it should become:

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

You should do the same for all code with array_merge.

Note: The behaviour of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array. However, you can use typecasting to merge other types.

3. Here is the list of files which should be edited in such cases:

  • /catalog/admin/
  • banner_manager.php
  • categories.php
  • configuration.php
  • customers.php
  • manufacturers.php
  • orders.php
  • orders_status.php
  • reviews.php
  • specials.php
  • /catalog/admin/includes/clases/
  • emails.php
  • /catalog/admin/includes/functions/
  • compatibility.php
  • general.php
  • /catalog/includes/clases/
  • emails.php
  • http_client.php
  • /catalog/includes/functions/
  • compatibility.php
  • /catalog/includes/modules/payment/
  • paypal_uk_direct.php
  • paypal_uk_express.php