• Resolved Paul

    (@paulschiretz)


    Hi there,

    Just found another php 8.1 deprecation with woocommerce mini-cart, latest translatepress and woocommerce version:

    11-Nov-2023 22:59:47 UTC] PHP Deprecated:  trim(): Passing null to parameter #1 ($string) of type string is deprecated in xxx\app\public\wp-content\plugins\translatepress-multilingual\includes\gettext\class-gettext-manager.php on line 222
    [11-Nov-2023 22:59:47 UTC] PHP Stack trace:
    [11-Nov-2023 22:59:47 UTC] PHP   1. {main}() xxx\app\public\index.php:0
    [11-Nov-2023 22:59:47 UTC] PHP   2. require() xxx\app\public\index.php:17
    [11-Nov-2023 22:59:47 UTC] PHP   3. require_once() xxx\app\public\wp-blog-header.php:13
    [11-Nov-2023 22:59:47 UTC] PHP   4. require_once() xxx\app\public\wp-load.php:50
    [11-Nov-2023 22:59:47 UTC] PHP   5. require_once() xxx\app\public\wp-config.php:101
    [11-Nov-2023 22:59:47 UTC] PHP   6. do_action($hook_name = 'wp_loaded') xxx\app\public\wp-settings.php:665
    [11-Nov-2023 22:59:47 UTC] PHP   7. WP_Hook->do_action($args = [0 => '']) xxx\app\public\wp-includes\plugin.php:517
    [11-Nov-2023 22:59:47 UTC] PHP   8. WP_Hook->apply_filters($value = '', $args = [0 => '']) xxx\app\public\wp-includes\class-wp-hook.php:348
    [11-Nov-2023 22:59:47 UTC] PHP   9. Automattic\WooCommerce\Blocks\BlockTypes\MiniCart->register_empty_cart_message_block_pattern('') xxx\app\public\wp-includes\class-wp-hook.php:324
    [11-Nov-2023 22:59:47 UTC] PHP  10. __($text = 'Empty Mini-Cart Message', $domain = 'woocommerce') xxx\app\public\wp-content\plugins\woocommerce\packages\woocommerce-blocks\src\BlockTypes\MiniCart.php:573
    [11-Nov-2023 22:59:47 UTC] PHP  11. translate($text = 'Empty Mini-Cart Message', $domain = 'woocommerce') xxx\app\public\wp-includes\l10n.php:297
    [11-Nov-2023 22:59:47 UTC] PHP  12. apply_filters($hook_name = 'gettext', $value = 'Empty Mini-Cart Message', ...$args = variadic('Empty Mini-Cart Message', 'woocommerce')) xxx\app\public\wp-includes\l10n.php:197
    [11-Nov-2023 22:59:47 UTC] PHP  13. WP_Hook->apply_filters($value = 'Empty Mini-Cart Message', $args = [0 => 'Empty Mini-Cart Message', 1 => 'Empty Mini-Cart Message', 2 => 'woocommerce']) xxx\app\public\wp-includes\plugin.php:205
    [11-Nov-2023 22:59:47 UTC] PHP  14. TRP_Process_Gettext->process_gettext_strings_no_context($translation = 'Empty Mini-Cart Message', $text = 'Empty Mini-Cart Message', $domain = 'woocommerce') xxx\app\public\wp-includes\class-wp-hook.php:324
    [11-Nov-2023 22:59:47 UTC] PHP  15. TRP_Process_Gettext->process_gettext_strings($translation = 'Empty Mini-Cart Message', $text = 'Empty Mini-Cart Message', $domain = 'woocommerce', $context = *uninitialized*, $number_of_items = *uninitialized*, $original_plural = *uninitialized*) xxx\app\public\wp-content\plugins\translatepress-multilingual\includes\gettext\class-process-gettext.php:370
    [11-Nov-2023 22:59:47 UTC] PHP  16. TRP_Gettext_Manager::is_ajax_on_frontend() xxx\app\public\wp-content\plugins\translatepress-multilingual\includes\gettext\class-process-gettext.php:85
    [11-Nov-2023 22:59:47 UTC] PHP  17. trim($string = NULL, $characters = '/') xxx\app\public\wp-content\plugins\translatepress-multilingual\includes\gettext\class-gettext-manager.php:222

    Not an issue for me, but thought i let you know!

    All the best,
    Paul

Viewing 1 replies (of 1 total)
  • Plugin Support Anca

    (@ancavictoria)

    Hello Paul,

    Thank you for reporting this to us.
    I passed them over to the development team, and they will try to address a fix as soon as possible.

    We will let you know the moment we have an update regarding this.

    Kind Regards,
    Anca

Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce related php 8.1 deprecation’ is closed to new replies.