Sie sind auf Seite 1von 3

coding tips, tricks, help, and more!

Home About Me Blog Coding Help Contact

Search

Dec 3, 2011 Posted by Libby Fisher on Dec 3, 2011 in Ecommerce, WordPress | 2 comments

Fixing the Warning: array_merge() [function.array-merge]: error in WordPresss WP-Ecommerce plugin


When I first installed the WP-Ecommerce plugin on a website this morning and tried to go to the products page, I got this error:

0
Tw eet

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /public_html/wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-functions.php on line 622

Thankfully, it is actually very easy to fix this error. All you need to do is add (array) to the correct line of code in the plugins functions.php file. Find this line in your wp-e-commerce/wpsc-core/wpsc-functions.php file:

$args = array_merge($wp_query->query, array('posts_per_page' => get_option('wpsc_products_per_page')));

And change it to this:

$args = array_merge((array)$wp_query->query, array('posts_per_page' => get_option('wpsc_products_per_page')));

That did the trick for me and hopefully will work for you too. Let me know if you have any questions or run into issues with this.
Me gusta S el primero de tus amigos al que le guste esto.

Related Posts:
A quick way to fix the broken pagination on your WordPress category or archive pages when using custom queries WordPress Tricks: Use a WordPress query to exclude a category from your home page without breaking pagination WordPress Tips: How to remove the extra space between LI elements from wp_nav_menu

WordPress Tricks: How to Show Most Recent Posts from Specific Categories with Thumbnails WordPress Tricks: Add a div or other element to one specific page or page type

2 Responses to Fixing the Warning: array_merge() [function.array-merge]: error in WordPresss WP-Ecommerce plugin

1.

Alexander Firsov says: May 30, 2012 at 11:27 pm Dear Libby Fisher, Thank you very much for this advice! I had a similar problem in Interspire Shopping Cart and was able to fix it the same way! Reply

Libby Fisher says: June 11, 2012 at 3:50 pm Hi Alexander, Thats great to hear, thanks for letting me know! Reply

Leave a Reply
Your email address will not be published. Required fields are marked * Name * Email * Website

CAPTCHA Code *

Comment You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">
Submit Comment

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Looking for something?


Search

All-Time Popular Posts CSS Tricks: Use two background images for one div How to create a coupon discount for PayPal buttons A simple tabbed navigation menu created with CSS, HTML, and jQuery Using two background images for one div in IE Website forms: Use Javascript to auto fill one field with the values from two other fields Today's Popular Posts Use a dropdown menu to apply a discount to your PayPal button Developing a custom store locator map: Embed your map into an HTML page How to create a coupon discount for PayPal buttons Fixing the Warning: array_merge() [function.array-merge]: error in WordPresss WP-Ecommerce plugin Recent Posts

A quick way to fix the broken pagination on your WordPress category or archive pages when using custom queries WordPress Tricks: Use a WordPress query to exclude a category from your home page without breaking pagination WordPress Tips: How to remove the extra space between LI elements from wp_nav_menu WordPress Tricks: How to Show Most Recent Posts from Specific Categories with Thumbnails Joomla Tips: How to assign body IDs to each page Javascript Trick: Add a class or ID to an HTML element on hover
Archives Select Month Categories ASPX Concrete5 CSS Ecommerce HTML Javascript Joomla jQuery mySQL PHP Random WordPress ICode4You is owned and operated by TheLibzter.com

Das könnte Ihnen auch gefallen