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
Thank you so so much!
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.
Glad to see it worked out for you, Jennifer. And thanks for adding it to the WP support forum.