-1

1.please, check screenshot https://prnt.sc/h76myo when I am trying to edit customers information from admin ends its showing this error.

also, it's not showing exact information of input fields. according to file the error should be going to remove when I have replaced the code

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

to

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

After changes this the next two errors occurring due to this I cannot able edit customers information records into admin. The two error is like below :

 Warning: reset() expects parameter 1 to be array, null given in C:\Program Files (x86)\Ampps\www\oscom3\admin\includes\classes\object_info.php on line 17

Warning: Variable passed to each() is not an array or object in C:\Program Files (x86)\Ampps\www\oscom3\admin\includes\classes\object_info.php on line 18

and here is the object_info.php file code

<?php 
  class objectInfo {

// class constructor
    function objectInfo($object_array) {
      reset($object_array);
      while (list($key, $value) = each($object_array)) {
        $this->$key = tep_db_prepare_input($value);
      }
    }
  } 
?>

I have searched the oscommerce forums everyforms users errors has been resolved when the just overight the code with this

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

Only my case the two more warning going to occuring

please help!

R.K.Bhardwaj
  • 2,168
  • 1
  • 14
  • 24

1 Answers1

0

In future, if anyone faces these kinds of the problem first of all check that your database tables imported correctly or not?

The two tables combinations going to wrong that's why code going to occur problem the two tables are

customers and address_book

I have to reimport it and the issue going to solve.

You should try first check database tables correctly and then try this code

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

for customers.php coding files

Thanks

R.K.Bhardwaj
  • 2,168
  • 1
  • 14
  • 24