Ready to get started?Download WordPress


preg_match ERROR! (3 posts)

  1. Arturol
    Posted 1 year ago #

    Can anybody help with this?

    Warning: preg_match() [function.preg-match]: No ending delimiter '/' found in /home/o8/public/www/wp-content/plugins/woocommerce-gateway-dibs-form/gateway-dibs.php on line 707

  2. Arturol
    Posted 1 year ago #

    This is the code in the php file:
    if ( preg_match($_SERVER["REQUEST_URI"], 'woocommerce/dibscancel') !== false) {

    header("HTTP/1.1 200 Ok");

    $callback = new WC_Gateway_Dibs;

  3. vtxyzzy
    Posted 1 year ago #

    In preg_match, the pattern is the first parameter, not the second. The pattern must be enclosed in delimiters. Slashes are the normal delimiter, but since your pattern contains a slash, you could use a hash mark (#).

    I think what you want is this:

    if ( preg_match( '#woocommerce/dibscancel#', $_SERVER["REQUEST_URI"]) !== false) {

Topic Closed

This topic has been closed to new replies.

About this Topic