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”
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
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