From bf03e57ac92b97254f4c577b52bab8e76bc87ca9 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 7 Aug 2011 01:56:22 -0400 Subject: [PATCH] Make sure $rule_frag has length before indexing it. --- http/url_map.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/url_map.php b/http/url_map.php index ad7541a..bc40a67 100644 --- a/http/url_map.php +++ b/http/url_map.php @@ -160,7 +160,7 @@ class UrlMap // If this fragment is a key to be extracted, do so into a temporary // array. - if ($rule_frag[0] == '{' && substr($rule_frag, -1) == '}') { + if (strlen($rule_frag) && $rule_frag[0] == '{' && substr($rule_frag, -1) == '}') { $key = substr($rule_frag, 1, -1); $extractions[$key] = $fragments[$i]; } -- 2.43.5