• Resolved gevcen

    (@gevcen)


    Dear,

    I’m getting those warnings in debug.log, can you please help understand what this is about? Is this a WordPress issue?

    [30-Dec-2019 20:30:25 UTC] PHP Warning: strip_tags() expects parameter 1 to be string, array given in /home/customer/www/gevcen.be/public_html/wp-includes/formatting.php on line 2212

    [30-Dec-2019 20:30:25 UTC] PHP Warning: preg_match() expects parameter 2 to be string, array given in /home/customer/www/gevcen.be/public_html/wp-includes/formatting.php on line 1602

    Thanks

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Hari Shanker R

    (@harishanker)

    Hi @gevcen

    I’m getting those warnings in debug.log, can you please help understand what this is about? Is this a WordPress issue?

    I tried testing with the latest version of WooCommerce, but I couldn’t get the error to display in my test site. I tried testing with WooCommerce 3.8.1 and WordPress 5.3.2. So it’s unlikely that the error is coming from WooCommerce iteslf.

    The error: PHP Warning: strip_tags() expects parameter 1 to be string, array given as well as PHP Warning: preg_match() expects parameter 2 to be string, array given refer to code that is set to ‘format’ titles and strings to remove spaces and accents.

    You can find the codes here:
    https://github.com/WordPress/WordPress/blob/master/wp-includes/formatting.php#L2214
    https://github.com/WordPress/WordPress/blob/master/wp-includes/formatting.php#L1604

    It appears that some plugin that you use for site (which returns content) is returning an array value instead of a string value, causing this issue.

    You might want to check for your PHP error log to see a full version of the warning message. This might point you to the plugin that triggers this issue.

    The other method would be to do a conflict test (disabling all plugins except WooCommerce and switching to a default theme). You can read more on how to do this here: https://docs.woocommerce.com/document/how-to-test-for-conflicts/

    I’d recommend creating a staging site using a plugin like WP Staging to be on the safer side.

    I hope that helps!

    Thread Starter gevcen

    (@gevcen)

    Dear,

    In the same topic. How about this error? Is it also due to plugin compatibility issue or is it WooCommerce issue?

    Thanks

    [13-Jan-2020 07:43:50 UTC] PHP Notice: Undefined property: stdClass::$version in /home/customer/www/gevcen.be/public_html/wp-content/plugins/woocommerce/includes/admin/class-wc-admin-status.php on line 251

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @gevcen

    I cannot replicate the notice using the most recent version of WooCommerce active and the Twenty Twenty theme enabled. Were you able to conflict test?

    Here is a link that better outlines that process:

    https://docs.woocommerce.com/document/woocommerce-self-service-guide/#section-4

    If this fixes the issue, then re-enable each plugin one at a time, then the theme, until you find the one that’s causing the conflict.

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @gevcen

    We haven’t heard back from you so we’re going to mark this support thread resolved. Please feel free to open a new thread should you find this issue persists with the most recent version of WooCommerce.

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP 7.3 – Issues on debug.log’ is closed to new replies.