summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-08-27 12:06:45 -0400
committerCraig Andrews <candrews@integralblue.com>2009-08-27 12:06:45 -0400
commit2dd5a5f86d5242362499c381c8d9519f40a8925b (patch)
treeb8c0a3f2c973cbd1982db5f48b07622619557840
parentb7beac36c2dbebfa27982b2fc6c82cf2ebbaae8d (diff)
Do not used named capturing groups
I'm not sure all php 5.2's are compiled with a PCRE library that supported named captures.
-rw-r--r--lib/util.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index 7c1e21913..1e7834057 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -413,7 +413,7 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
// Start off with a regex
$regex = '#'.
'(?:^|[\s\(\)\[\]\{\}\\\'\\\";]+)(?![\@\!\#])'.
- '(?P<url>'.
+ '('.
'(?:'.
'(?:'. //Known protocols
'(?:'.
@@ -454,7 +454,7 @@ function common_replace_urls_callback($text, $callback, $notice_id = null) {
}
function callback_helper($matches, $callback, $notice_id) {
- $url=$matches['url'];
+ $url=$matches[1];
$left = strpos($matches[0],$url);
$right = $left+strlen($url);