nlopess Wed Jun 27 19:12:25 2007 UTC
Modified files:
/livedocs error.php
Log:
use preg_quote() to escape strings for preg_* functions
http://cvs.php.net/viewvc.cgi/livedocs/error.php?r1=1.16&r2=1.17&diff_format=u
Index: livedocs/error.php
diff -u livedocs/error.php:1.16 livedocs/error.php:1.17
--- livedocs/error.php:1.16 Tue Jun 19 23:22:52 2007
+++ livedocs/error.php Wed Jun 27 19:12:25 2007
@@ -18,7 +18,7 @@
// | Handles the 404 error and try to redirect to the good place. |
// +----------------------------------------------------------------------+
//
-// $Id: error.php,v 1.16 2007/06/19 23:22:52 philip Exp $
+// $Id: error.php,v 1.17 2007/06/27 19:12:25 nlopess Exp $
/* handle IIS style 404 handler */
if (strncmp($_SERVER['SERVER_SOFTWARE'], "Microsoft", 9) == 0 &&
@@ -86,7 +86,7 @@
}
$current_page = preg_replace('|^/|', '', $current_page);
- $current_page = preg_replace('|'.quotemeta(FILECACHE_EXT).'$|', '',
$current_page);
+ $current_page = preg_replace('/'.preg_quote(FILECACHE_EXT).'$/', '',
$current_page);
if (preg_match('|([A-Za-z_]{2,5})/(.*)|', $current_page, $m)) {
$current_page = preg_replace(IDREG, '', $m[2]);
} else if (preg_match('|(.*)|', $current_page, $m)) {