diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index fb7ccc04d8b..12ac338535c 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -516,8 +516,13 @@ public function is($type) { } if (isset($detect['param'])) { $key = $detect['param']; - $value = $detect['value']; - return isset($this->params[$key]) ? $this->params[$key] == $value : false; + if (isset($detect['value'])) { + $value = $detect['value']; + return isset($this->params[$key]) ? $this->params[$key] == $value : false; + } + if (isset($detect['options'])) { + return isset($this->params[$key]) ? in_array($this->params[$key],$detect['options']) : false; + } } if (isset($detect['callback']) && is_callable($detect['callback'])) { return call_user_func($detect['callback'], $this);