Warning: array_merge() error in WP e-commerce
-
I am getting this error when I upload a photo in the WP e-commerce plugin. I am pretty sure it is related to the thumbnail options which are a little unclear.:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/(mysite)/wp-content/plugins/wp-e-commerce/wpsc-admin/includes/display-items-functions.php on line 984Here’s the corresponding template code:
// regenerate size metadata in case it's missing if ( ! image_get_intermediate_size( $post->ID, $check ) ) { if ( ! $metadata = wp_get_attachment_metadata( $post->ID ) ) $metadata = array(); $file = get_attached_file( $post->ID ); $generated = wp_generate_attachment_metadata( $thumbnail_id, $file ); $metadata['sizes'] = array_merge( $generated['sizes'], $metadata['sizes'] ); wp_update_attachment_metadata( $post->ID, $metadata ); }
Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Warning: array_merge() error in WP e-commerce’ is closed to new replies.