• Resolved JapeNZ

    (@japenz)


    Hi there,
    I noticed a PHP Warning in my debug log:

    PHP Warning: preg_match(): Unknown modifier ‘t’ in /home/comicboo/public_html/wp-content/plugins/wp-lister-ebay/classes/core/WPL_Core.php on line 138

    AI recommended this fix, but I don’t intend on changing any plugin files, thought I should share in case you were unaware of the php warning 🙂

    Line 138:

    if ( preg_match( “/$staging_site_pattern/”, $url ) ) { return true; }

    The variable $staging_site_pattern likely contains a URL or a file path (e.g., staging/site). Because the code uses forward slashes / as delimiters, the first / found inside your URL/path terminates the expression, and the character immediately following it (the t in http:// or staging/site) is treated as an invalid modifier [1, 2].

    To fix this, change the delimiters to a character that won’t appear in a URL, such as #.

    The Fix

    Replace the code in /home/comicboo/public_html/wp-content/plugins/wp-lister-ebay/classes/core/WPL_Core.php on line 138 with this:

    if ( preg_match( "#" . preg_quote($staging_site_pattern, '#') . "#", $url ) ) {
        return true;
    }

    Cheers

    • This topic was modified 5 months, 1 week ago by JapeNZ.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support msantamaria

    (@msantamaria)

    Hi @japenz ,

    We appreciate you reporting this issue. Our team will address it and include the fix in the upcoming release.

    Kind regards,

    Menchie
    WPLab Support

    Plugin Author WP Lab

    (@wp-lab)

    Hi JapeNZ,

    Thank you for the detailed bug report and fix! You’re right – the regex delimiter issue with staging URLs. We’ll include this fix in the next release.

    Appreciate you sharing the solution.

    Best regards,
    WP-Lister Support

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

You must be logged in to reply to this topic.