• I am getting a critical error message when your plugin is active : the BA is in conflict while updating and publishing Woocommerce products pages. What could be reason?

    Error Details
    =============
    An error of type E_ERROR was caused in line 124 of the file /var/www/wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php. Error message: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /var/www/wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php:124
    Stack trace:
    #0 /var/www/wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php(124): array_map(‘stripslashes_de…’, NULL)
    #1 /var/www/wp-includes/class-wp-hook.php(310): s201_save_post(21)
    #2 /var/www/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array)
    #3 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #4 /var/www/wp-includes/post.php(4715): do_action(‘save_post’, 21, Object(WP_Post), true)
    #5 /var/www/wp-includes/post.php(4817): wp_insert_post(Array, false, true)
    #6 /var/www/wp-admin/includes/post.php(439): wp_update_post(Array)
    #7 /var/www/wp-admin/post.php(227): edit_post()
    #8 {main}
      thrown

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m getting a similar error message.
    any help would be appreciated. seems to be coming from the cart-totals file?
    CRITICAL Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, float given in /var/www/xxx.com/public_html/wp-content/plugins/woocommerce/includes/class-wc-cart-totals.php:353 intext:”Plugin: WooCommerce”

    dragolin

    (@dragolin)

    I’m having a critical error as well, since updating to the latest WordPress.

    I am getting a similar error as the OP.

    With the plug in active, ANY time I save a page the error occurs. ALWAYS. The Page does save, but I have to back page to get back to the admin

    When seeking help with this issue, you may be asked for some of the following information: WordPress version 6.4.2 Active theme: Story Child (version ) Current plugin: BA Plus – Before & After Image Slider FREE (version 1.0.3) PHP version 8.1.26 Error Details ============= An error of type E_ERROR was caused in line 124 of the file /home/carfac/public_html/photoslc/wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php. Error message: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/carfac/public_html/photoslc/wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php:124 Stack trace: #0 /home/carfac/public_html/photoslc/wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php(124): array_map(‘stripslashes_de…’, NULL) #1 /home/carfac/public_html/photoslc/wp-includes/class-wp-hook.php(326): s201_save_post(3882) #2 /home/carfac/public_html/photoslc/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /home/carfac/public_html/photoslc/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/carfac/public_html/photoslc/wp-includes/post.php(4760): do_action(‘save_post’, 3882, Object(WP_Post), true) #5 /home/carfac/public_html/photoslc/wp-includes/post.php(4862): wp_insert_post(Array, false, true) #6 /home/carfac/public_html/photoslc/wp-admin/includes/post.php(453): wp_update_post(Array) #7 /home/carfac/public_html/photoslc/wp-admin/post.php(227): edit_post() #8 {main} thrown

    oemam

    (@oemam)

    Its some time ago but i added 2 lines to fix this error so maybe this helps other affected installations.

    If it’s possible, the plugin-author could integrate something like this:

    /wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php:124

    if ( isset($_POST['s201_label']) ) { // added to remove error: Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php:124
    $_POST['s201_label'] = array_map('stripslashes_deep', $_POST['s201_label']);
    foreach($_POST['s201_img_id'] as $slides_id=>$slides){
    $data = s201_validate_post_data($slides_id, $slides);
    if(strpos($slides_id, 'new_')===0){
    $data['post_id'] = $post_id;
    $wpdb->insert($tbl_s201_bai, $data);
    $row_id = $wpdb->insert_id;
    }
    else{
    $wpdb->update($tbl_s201_bai, $data, array('id'=>$slides_id));
    }
    }
    } // added to remove error: Fatal error: Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /wp-content/plugins/ba-plus-before-after-image-slider-free/admin.php:124

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.