We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d631609 commit d68c451Copy full SHA for d68c451
src/Symfony/Component/Cache/CacheItem.php
@@ -101,7 +101,7 @@ public function expiresAfter($time)
101
*
102
* @param string $key The key to validate
103
104
- * @throws InvalidArgumentException When $key is not valid.
+ * @throws InvalidArgumentException When $key is not valid
105
*/
106
public static function validateKey($key)
107
{
@@ -111,7 +111,7 @@ public static function validateKey($key)
111
if (!isset($key[0])) {
112
throw new InvalidArgumentException('Cache key length must be greater than zero');
113
}
114
- if (isset($key[strcspn($key, '{}()/\@:')])) {
+ if (false !== strpbrk($key, '{}()/\@:')) {
115
throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters {}()/\@:', $key));
116
117
0 commit comments