|
|
@@ -647,16 +647,16 @@ class Request implements ArrayAccess
|
|
|
if (!isset(static::$_detectors[$type])) {
|
|
|
return false;
|
|
|
}
|
|
|
-
|
|
|
- if (empty($args)) {
|
|
|
- if (!isset($this->_detectorCache[$type])) {
|
|
|
- $this->_detectorCache[$type] = $this->_is($type, $args);
|
|
|
- }
|
|
|
|
|
|
- return $this->_detectorCache[$type];
|
|
|
+ if ($args) {
|
|
|
+ return $this->_is($type, $args);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!isset($this->_detectorCache[$type])) {
|
|
|
+ $this->_detectorCache[$type] = $this->_is($type, $args);
|
|
|
}
|
|
|
|
|
|
- return $this->_is($type, $args);
|
|
|
+ return $this->_detectorCache[$type];
|
|
|
}
|
|
|
|
|
|
/**
|