Support » Plugin: Product Size Chart for Woocommerce » error under php8

  • HI.
    This great plugin.but when upgrate php7 to php8,add new chart then post to save.there is error:
    ————–

    2021-09-07T03:15:51+00:00 CRITICAL Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given
     in /var/www/html/wordpress/wp-content/plugins/productsize-chart-for-woocommerce/admin/class-productsize-chart-admin.php:2
    22
    Stack trace:
    #0 /var/www/html/wordpress/wp-content/plugins/productsize-chart-for-woocommerce/admin/class-productsize-chart-admin.php(22
    2): array_map()
    #1 /var/www/html/wordpress/wp-includes/class-wp-hook.php(305): productsize_chart_Admin->productsize_chart_save()
    #2 /var/www/html/wordpress/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #3 /var/www/html/wordpress/wp-includes/plugin.php(470): WP_Hook->do_action()
    #4 /var/www/html/wordpress/wp-includes/post.php(4468): do_action()
    #5 /var/www/html/wordpress/wp-includes/post.php(4570): wp_insert_post()
    #6 /var/www/html/wordpress/wp-admin/includes/post.php(423): wp_update_post()
    #7 /var/www/html/wordpress/wp-admin/post.php(227): edit_post()
    #8 {main}
      thrown in /var/www/html/wordpress/wp-content/plugins/productsize-chart-for-woocommerce/admin/class-productsize-chart-adm
    in.php on line 222
    
    2021-09-07T05:39:28+00:00 CRITICAL Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given
     in /var/www/html/wordpress/wp-content/plugins/productsize-chart-for-woocommerce/admin/class-productsize-chart-admin.php:2
    22
    Stack trace:
    #0 /var/www/html/wordpress/wp-content/plugins/productsize-chart-for-woocommerce/admin/class-productsize-chart-admin.php(22
    2): array_map()
    #1 /var/www/html/wordpress/wp-includes/class-wp-hook.php(305): productsize_chart_Admin->productsize_chart_save()
    #2 /var/www/html/wordpress/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #3 /var/www/html/wordpress/wp-includes/plugin.php(470): WP_Hook->do_action()
    #4 /var/www/html/wordpress/wp-includes/post.php(4468): do_action()
    #5 /var/www/html/wordpress/wp-includes/post.php(4570): wp_insert_post()
    #6 /var/www/html/wordpress/wp-admin/includes/post.php(423): wp_update_post()
    #7 /var/www/html/wordpress/wp-admin/post.php(227): edit_post()
    #8 {main}
      thrown in /var/www/html/wordpress/wp-content/plugins/productsize-chart-for-woocommerce/admin/class-productsize-chart-adm
    in.php on line 222

    ——————-
    it’s can not work any more.
    and then I choose a “chart catagory”,test again,it’s work fine.
    I thinks filed of “chart catagory” is not necessary,I do not think the size chart need to display for the whole catagory。。。。。。

    • This topic was modified 11 months, 1 week ago by xiutuo.
    • This topic was modified 11 months, 1 week ago by xiutuo.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘error under php8’ is closed to new replies.