File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Symfony/Component/Cache Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public function expiresAfter($time)
101
101
*
102
102
* @param string $key The key to validate
103
103
*
104
- * @throws InvalidArgumentException When $key is not valid.
104
+ * @throws InvalidArgumentException When $key is not valid
105
105
*/
106
106
public static function validateKey ($ key )
107
107
{
@@ -111,7 +111,7 @@ public static function validateKey($key)
111
111
if (!isset ($ key [0 ])) {
112
112
throw new InvalidArgumentException ('Cache key length must be greater than zero ' );
113
113
}
114
- if (isset ($ key[ strcspn ( $ key , '{}()/\@: ' )] )) {
114
+ if (false !== strpbrk ($ key , '{}()/\@: ' )) {
115
115
throw new InvalidArgumentException (sprintf ('Cache key "%s" contains reserved characters {}()/\@: ' , $ key ));
116
116
}
117
117
}
You can’t perform that action at this time.
0 commit comments