Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Trouble with Customers in Admin - getting warning, no access to accounts

customers admin warning

4 replies to this topic

#1 lia_green

  • Community Member
  • 38 posts
  • Real Name:amelia leeves

Posted 05 February 2012, 20:25

Hi -

When I go to the customers admin, I see this warning above the customers list and while I can see the customer names, it will not let me edit the files:

Warning: Passed variable is not an array or object in
admin/includes/classes/object_info.php on line 17

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


every thing else is working fine, I can set up new customers via the website and retrieve account info and passwords, but through the admin can not access customers.

Any help or suggestions would be appreciated!

thanks

#2 jcall

  • Community Member
  • 3,092 posts
  • Real Name:Jared Call
  • Gender:Male
  • Location:Saratoga Springs, UT

Posted 09 February 2012, 05:07

I have run into this before with a particular customer that got corrupted somehow. I don't recall all the details, but if memory serves, there was one customer listed on the same page as the error that had some unusual characters in their name. I used phpMyAdmin to delete that customer from the customers table (and related tables) and the error disappeared.

Before doing anything of the sort, take a database backup first.

#3 lia_green

  • Community Member
  • 38 posts
  • Real Name:amelia leeves

Posted 13 February 2012, 16:58

I only have 3 test customers, deleted them all and the warning went away. Created a new test account with all new information and the warning came back.

All the searches have suggested this fix for the problem:
Solution:
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);

These lines do not show up in my admin/customers.php file - I'm in v2.3.1

#4 DunWeb

  • Community Sponsor
  • 10,468 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 13 February 2012, 18:14

@lia_green

I have never experienced this with v2.3.1, however in RC2a the fix was to truncate the customer, address_book and customer_info tables in the database.




Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:

#5 geoffreywalton

  • Community Sponsor
  • 7,731 posts
  • Real Name:Geoffrey Walton
  • Gender:Male
  • Location:Norfolk, UK (close to the centre of the universe)

Posted 13 February 2012, 20:41

Standard 23.1 customers.php has this at line 706

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

What do you have in your copy?

G
Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.

For links mentioned in old answers that are no longer here follow this link Useful Threads.

If this post was useful, click the Like This button over there ======>>>>>.