FIX: WP e-Commerce Product Image Upload Problem

WP e-Commerce shopping cart, v3.8.6
WordPress, v3.2.1

Problem:

Can’t complete a product image upload. I keep getting the following error after attempting to upload an image into the product’s description field:

“Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /XXXXXXXX/store.designparc/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/display-items-functions.php on line 984”

Solution:

File: root/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/display-items-functions.php

Change line 1018:

$metadata[‘sizes’] = array_merge( $generated[‘sizes’], $metadata[‘sizes’] );

To:

$metadata[‘sizes’] = array_merge( (array)$generated[‘sizes’], (array)$metadata[‘sizes’] );

Original solution post: http://getshopped.org/forums/topic/warning-array_merge-functionarray-merge/#post-217801

No Comments

  1. Jacob Louis on September 10, 2011 at 11:38 pm

    Thank you so so much!

  2. Jennifer Nickerson on September 23, 2011 at 10:12 am

    Thanks!  For me it was line 984, but your fix worked.  I posted a link to this over on a thread on the WP support forum.

  3. Reid Walley on September 23, 2011 at 4:34 pm

    Glad to see it worked out for you, Jennifer. And thanks for adding it to the WP support forum.

Leave a Comment