• Hello.

    PHP 8.3.9 (but exists in other versions too).

    The warning appears after parsing $wp_rewrite->wp_rewrite_rules();

    Warning: preg_match(): Unknown modifier ‘w’

    After some debug I found that it is caused by
    \yith-woocommerce-wishlist\includes\class-yith-wcwl.php:233

    $regex_paged  = '((?!wp-json/.*)([^/]+/)*' . urldecode( $wishlist_page_slug ) . ')(/(.*))?/page/([0-9]{1,})/?$';

    It generates this regular expression:

    ‘((?!wp-json/.)([^/]+/) * wishlist)(/(.*))?/page/([0-9]{1,})/?$’

    (and causing the Unknown modifier ‘w’ warning)

    Before the update it was like this and this regex worked correctly without warnings:

    $regex_paged  = '(([^/]+/)*' . urldecode( $wishlist_page_slug ) . ')(/(.*))?/page/([0-9]{1,})/?$';


    Please let me know if you need more information about this.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.