Sitemap Pinger

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy


You must be logged in to post.

PHP Warning - Error in preg_match pattern

Bug Report

David Hyland
David Hyland

A PHP Error was encountered
Severity: Warning
Message: preg_match() [function.preg-match]: Unknown modifier ‘[’
Filename: sitemap_pinger/ext.sitemap_pinger.php
Line Number: 265

The following conditional at line 265 should be :

if (!preg_match('/^HTTP\/[0-9\.]+ 200 /'$response))
return false

The forward slash should be backslashed.

David Hyland
# 1
David Hyland

Please note this error does not occur in v1.0 only in v1.0.2

Yuri Salimovskiy
# 2
Yuri Salimovskiy

Thanks, David.
I’ve switched from using ereg to preg_match and forgot to backslash that.