• Resolved centuryperf

    (@centuryperf)


    The PHP warning below appears in Query Monitor. I found it on the WooCommerce General Settings tab for ShipStation Shipping, a plugin by 1TeamSoftware. It claims to originate from WPForms Lite and appears to be a formatting error. I have found similar posts in the main support forums, but have not found a useful solution. Does anyone have any suggestions or a possible fix?

    Warning: Array to string conversion Component: Plugin, wpforms-lite

      wp-includes/formatting.php:1096
    WPForms\ErrorHandler->fallback_error_handler()
    wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
    WPForms\ErrorHandler->error_handler()
    wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
    WPForms\ErrorHandler->fallback_error_handler()
    wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
    WPForms\ErrorHandler->error_handler()
    wp-includes/formatting.php:1096
    wp_check_invalid_utf8()
    wp-includes/formatting.php:4689
    esc_attr()
    phar://wp-content/plugins/wc-shipstation-shipping-pro/includes.phar/WC/Shipping/AbstractShippingMethod.php:2
    OneTeamSoftware\W\S\AbstractShippingMethod->generate_text_html()
    phar://wp-content/plugins/wc-shipstation-shipping-pro/includes.phar/WC/Shipping/AbstractShippingMethod.php:2
    OneTeamSoftware\W\S\AbstractShippingMethod->generate_field_html()
    phar://wp-content/plugins/wc-shipstation-shipping-pro/includes.phar/WC/Shipping/AbstractShippingMethod.php:2
    OneTeamSoftware\W\S\AbstractShippingMethod->generate_settings_html()
    wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-shipping-method.php:463
    WC_Shipping_Method->get_admin_options_html()
    wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-shipping-method.php:477
    WC_Shipping_Method->admin_options()
    wp-content/plugins/woocommerce/includes/admin/settings/class-wc-settings-shipping.php:192
    WC_Settings_Shipping->output()
    wp-includes/class-wp-hook.php:324
    do_action('woocommerce_settings_shipping')
    wp-content/plugins/woocommerce/includes/admin/views/html-admin-settings.php:78
    WC_Admin_Settings::output()
    wp-content/plugins/woocommerce/includes/admin/class-wc-admin-menus.php:358
    WC_Admin_Menus->settings_page()
    wp-includes/class-wp-hook.php:324
    do_action('woocommerce_page_wc-settings')
    wp-admin/admin.php:260

    In addition, this page presents two other Deprecated PHP errors linked to WPForms-Lite.

    strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

    wp-includes/functions.php:7360
    WPForms\ErrorHandler->fallback_error_handler()
    wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
    WPForms\ErrorHandler->error_handler()
    wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
    WPForms\ErrorHandler->fallback_error_handler()
    wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
    WPForms\ErrorHandler->error_handler()
    wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
    strpos()
    wp-includes/functions.php:7360
    wp_is_stream()
    wp-includes/functions.php:2188
    wp_normalize_path()
    wp-includes/plugin.php:769
    plugin_basename()
    wp-admin/includes/plugin.php:1478
    add_submenu_page()
    wp-content/plugins/woocommerce-recommendation-engine/classes/class-wc-recommender-onboarding.php:127
    WC_Recommender_Onboarding->register_onboarding_page()
    wp-includes/class-wp-hook.php:324
    do_action('admin_menu')
    wp-admin/includes/menu.php:161
      str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

      wp-includes/functions.php:2195
      WPForms\ErrorHandler->fallback_error_handler()
      wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
      WPForms\ErrorHandler->error_handler()
      wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
      WPForms\ErrorHandler->fallback_error_handler()
      wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
      WPForms\ErrorHandler->error_handler()
      wp-content/plugins/wpforms-lite/src/ErrorHandler.php:270
      str_replace()
      wp-includes/functions.php:2195
      wp_normalize_path()
      wp-includes/plugin.php:769
      plugin_basename()
      wp-admin/includes/plugin.php:1478
      add_submenu_page()
      wp-content/plugins/woocommerce-recommendation-engine/classes/class-wc-recommender-onboarding.php:127
      WC_Recommender_Onboarding->register_onboarding_page()
      wp-includes/class-wp-hook.php:324
      do_action('admin_menu')
      wp-admin/includes/menu.php:161str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

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

    Viewing 2 replies - 1 through 2 (of 2 total)
    • Plugin Support Ralden Souza

      (@rsouzaam)

      Hi @centuryperf,

      Thanks for reaching out!

      After checking the three errors you reported, it looks like the first error is related to /wp-content/plugins/wc-shipstation-shipping-pro/ and the other two errors are related to /wp-content/plugins/woocommerce-recommendation-engine/.

      At the beginning of each of these errors, you’ll see WPForms\ErrorHandler->fallback_error_handler(). This means our ErrorHandler captured the error because the plugins aren’t reporting it directly. Because of this, Query Monitor is picking up the error from our ErrorHandler rather than directly from the plugins involved.

      If you’d like to remove those warnings, you can easily disable our ErrorHandler. To do this, simply add the following line to your wp-config.php file:

      define( 'WPFORMS_DISABLE_ERROR_HANDLER', true );

      Just in case it helps, you can find detailed instructions on how to edit the wp-config.php file in this helpful WPBeginner guide.

      I hope this information helps you out! If you have any other questions about WPForms, please don’t hesitate to ask!

      Plugin Support Ralden Souza

      (@rsouzaam)

      Hi @centuryperf,

      We haven’t heard back from you in a few days, so I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.

      Thanks!

    Viewing 2 replies - 1 through 2 (of 2 total)

    You must be logged in to reply to this topic.