Jump to content

Warning: preg_match() [function.preg-match]: No ending delimiter '.' found


petventh

Recommended Posts

Please help me with this code. It keep appear in my website.

 

"Warning: preg_match() [function.preg-match]: No ending delimiter '.' found in /home/kengsite/public_html/wp-content/plugins/statpress/statpress.php on line 1184"

 

And this is how the line look like.

 

if (!preg_match(".ico$", $urlRequested)) { return ''; }

 

 

 

preg uses a character to define the beginning and end of the pattern try this:

 

if (!preg_match("@.ico$@", $urlRequested)) { return ''; }

 

@ is the beginning of the pattern matching string and therefore the end. In your example, the string is looking for . at the end. There is none so it gives you a warning.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.