From: Robert Sesek Date: Sun, 7 Aug 2011 05:56:22 +0000 (-0400) Subject: Make sure $rule_frag has length before indexing it. X-Git-Tag: api-2~47 X-Git-Url: https://src.bluestatic.org/?a=commitdiff_plain;h=bf03e57ac92b97254f4c577b52bab8e76bc87ca9;p=hoplite.git Make sure $rule_frag has length before indexing it. --- 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]; }