If this is your first visit, check our documentation. To post, register or login.
Forums / Installing on a Linux/Unix Server / Weird Array Related PHP error

Weird Array Related PHP error

Locked

Started by latin_quarter on 23 Jun 2006, 5:31 PM · Views: 1,753

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
23 Jun 2006, 5:31 PM
#1
latin_quarter avatar

latin_quarter

New Zenner

Join Date:
Jun 2006
Posts:
5
Plugin Contributions:
0

Weird Array Related PHP error

Hello Everybody,

First things first: I am a complete newbie when it comes to ZC, and I'm trying to learn fast. I've installed ZenCart on my shop website, everything seems to be in order, the installation gave me no error messages. However, When logging in to the Admin Section, most options of the 'Catalog' menu give me the following PHP error (while everything seems to be working)

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in XXXXXX_html/v2/cart/admin/includes/modules/category_product_listing.php on line 122

Warning: array_merge() [function.array-merge]: Argument #3 is not an array in XXXXXX_html/v2/cains/lrt/admin/includes/modules/category_product_listing.php on line 122

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

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

Why?

Cheers,

Bas

23 Jun 2006, 8:36 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Weird Array Related PHP error

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in XXXXXX_html/v2/cart/admin/includes/modules/category_product_listing.php on line 122Line 122 of that file is a PHP comment in all versions since as far back as at least v1.2.6.

v1.3.0.2 is out ...

So, either you've installed an addon/mod that contains out of date files, or you're using a very old version of Zen Cart...

Without digging back into more earlier versions of code, I can't even help you figure out what's causing it...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

24 Jun 2006, 8:35 AM
#3
latin_quarter avatar

latin_quarter

New Zenner

Join Date:
Jun 2006
Posts:
5
Plugin Contributions:
0

Re: Weird Array Related PHP error

...thank you for your reply...

You'd think I'd have an ancient version would you? And you were half right, I HAD. the problem occurred then too. The first thing I did though, was update to the lastest Version. I downloaded an installed the full fileset.

So if (apparently) these files are still 'out of date': why were they still in the new full fileset?

I'm stumped... I'll try uploading those specific files again...

Bas.

P.S. : Could it be that my server is running an outdated version of PHP, it doesn't seem to, but you never know...

24 Jun 2006, 8:42 AM
#4
latin_quarter avatar

latin_quarter

New Zenner

Join Date:
Jun 2006
Posts:
5
Plugin Contributions:
0

Re: Weird Array Related PHP error

re-uploading the admin/includes/modules and andmin/includes/classes folders seems to havae done the trick.

Thanks for the input!

24 May 2008, 10:28 PM
#5
janmedilek avatar

janmedilek

New Zenner

Join Date:
May 2008
Posts:
1
Plugin Contributions:
0

Re: Weird Array Related PHP error

Hi i got lucky day and i found out how to fix this.
in admin/includes/modules/category_product_listing.php on lines 119 and 120 there should be two commented lines. so just uncomment it by removing two slashes at begining of each line, and viola, it worked for me, i hope it will work ok for you too.

lines look like this then:

        $category_childs = array('childs_count' => zen_childs_in_category_count($categories->fields['categories_id']));
        $category_products = array('products_count' => zen_products_in_category_count($categories->fields['categories_id']));