Author: Christoph M. Becker (cmb69)
Date: 2022-10-24T18:17:44+02:00

Commit: 
https://github.com/php/web-master/commit/0a0bcf6055cadde7c07a733ba1e8c865fb440bf0
Raw diff: 
https://github.com/php/web-master/commit/0a0bcf6055cadde7c07a733ba1e8c865fb440bf0.diff

Fix recently introduced regex

Changed paths:
  M  include/spam-lib.inc


Diff:

diff --git a/include/spam-lib.inc b/include/spam-lib.inc
index 9f4b31e..8967801 100644
--- a/include/spam-lib.inc
+++ b/include/spam-lib.inc
@@ -89,7 +89,7 @@ function check_spam_urls ($text, $httplimit = 4) {
     if ((int) preg_match_all('~http(?:s)?://~', $text) >= $httplimit) {
         return true;
     }
-    if (preg_match('^https://', $text)) {
+    if (preg_match('~^https://~', $text)) {
         return true;
     }
     return false;

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to