Oscommerce issues after Upgrade PHP 5.3
After upgrading an OsCommerce site to PHP5 (5.3+ version) 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
To eliminate the 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);
How tu debug in php warnings & errors
// Set the level of error reporting
error_reporting(E_ALL & ~E_NOTICE);
//error_reporting(E_ALL);
//ini_set("display_errors", 1);
see also : http://php.net/manual/fr/errorfunc.configuration.php
PHP variables for 5.3 to use instead HTTP_ versions
// >>> BEGIN REGISTER_GLOBALS
if (version_compare(phpversion(), "4.1.0", ">") === true) {
$HTTP_GET_VARS = $_GET;
$HTTP_POST_VARS = $_POST;
$HTTP_SERVER_VARS = $_SERVER;
$HTTP_POST_FILES = $_FILES;
$HTTP_ENV_VARS = $_ENV;
if (isset($_COOKIE)) $HTTP_COOKIE_VARS = $_COOKIE;
}
// <<< END REGISTER_GLOBALS
Cheers
