Fixing the “Warning_ arr..

download Fixing the “Warning_ arr..

of 3

Transcript of Fixing the “Warning_ arr..

  • 8/13/2019 Fixing the Warning_ arr..

    1/3

    Twee

    0

    coding tips, tricks, help, and more!

    Home

    About Me

    Blog

    Coding HelpContact

    Search

    Dec 3, 2011 Posted by Libby Fisheron Dec 3, 2011in 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 pluginon a website this morning and tried to go to the products page, I

    got this error:

    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.phpon

    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

  • 8/13/2019 Fixing the Warning_ arr..

    2/3

    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 Firsovsays:

    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 Fishersays:

    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:

    Submit Comment

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

  • 8/13/2019 Fixing the Warning_ arr..

    3/3

    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 jQueryUsing 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 queriesWordPress 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