• Resolved mindyi

    (@mindyi)


    This is what we are seeing on the website on any page associated with her store:

    Warning: array_map(): Expected parameter 2 to be an array, string given in /home/customer/www/lorrainebosse-smith.com/public_html/wp-content/plugins/ecwid-shopping-cart/includes/shortcodes/class-ecwid-shortcode-productbrowser.php on line 212

    This is what it shows in that PHP file at that line:

    $shortcode_params = array_map( 'esc_attr', $shortcode_params );
    
            $atts = shortcode_atts(
    
                array(
    
                    'categories_per_row' => false,
    
                    'grid'               => false,
    
                    'list'               => false,
    
                    'table'              => false,
    
                    'search_view'        => false,
    
                    'category_view'      => false,
    
                ),
    
                $shortcode_params
    
            );
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Joanna from Ecwid by Lightspeed

    (@joannaecwid)

    Hello,

    This is Joanna from the Ecwid Support team. Thank you for letting us know about this issue.

    We will report it to our developers and investigate why the warning appeared.

    It looks like the debug mode is enabled on your WordPress site, which is causing the warning to be displayed on the live site. To disable debug mode, you should change the line define( ‘WP_DEBUG’, true ); to define( 'WP_DEBUG', false ); in your wp-config.php file.

    Just in case, here are the detailed instructions: https://developer.www.ads-software.com/advanced-administration/debug/debug-wordpress

    Please, let me know if you have any questions in the meantime.

    melbatoast4

    (@melbatoast4)

    Same problem for me, I think. I’m getting a critical error on the store page, and the error log shows:

    AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, string given in /var/www/vhosts/cigarminder.com/httpdocs/wp-content/plugins/ecwid-shopping-cart/includes/shortcodes/class-ecwid-shortcode-productbrowser.php:212\nStack trace:\n#0 /var/www/vhosts/cigarminder.com/httpdocs/wp-content/plugins/ecwid-shopping-cart/includes/shortcodes/class-ecwid-shortcode-productbrowser.php(212): array_map()\n#1 /var/www/vhosts/cigarminder.com/httpdocs/wp-content/plugins/ecwid-shopping-cart/includes/shortcodes/class-ecwid-shortcode-base.php(24): Ecwid_Shortcode_ProductBrowser->_process_params()\n#2 /var/www/vhosts/cigarminder.com/httpdocs/wp-content/plugins/ecwid-shopping-cart/includes/shortcodes/class-ecwid-shortcode-base.php(66): Ecwid_Shortcode_Base->__construct()\n#3 /var/www/vhosts/cigarminder.com/httpdocs/wp-content/plugins/ecwid-shopping-cart/includes/shortcodes.php(18): Ecwid_Shortcode_Base::get_shortcode_object()\n#4 /var/www/vhosts/cigarminder.com/httpdocs/wp-includes…’, referer: https://cigarminder.com/

    melbatoast4

    (@melbatoast4)

    We rolled back to PHP7 and the store is working again, but yeah, something isn’t right with that last update of the plugin. The file “class-ecwid-shortcode-productbrowser.php” doesn’t exist in the plugin folder.

    Ilnur Basyrov

    (@meteor1ecwid)

    Hi @mindyi and @melbatoast4

    This is Ilnur from the Ecwid by Lightspeed team. We are sorry that you encountered an error related to our plugin.

    We have released a bug fix in version 6.12.12. Feel free to upgrade to it.

    Regards,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error message Warning: array_map()’ is closed to new replies.