mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Parse cookie values "{}" & "[]" as array
This commit is contained in:
parent
9d87f6fcb5
commit
db63ba2d8f
1 changed files with 1 additions and 1 deletions
|
@ -534,7 +534,7 @@ class CookieComponent extends Component {
|
|||
$first = substr($string, 0, 1);
|
||||
if ($first === '{' || $first === '[') {
|
||||
$ret = json_decode($string, true);
|
||||
return ($ret) ? $ret : $string;
|
||||
return ($ret !== null) ? $ret : $string;
|
||||
}
|
||||
$array = array();
|
||||
foreach (explode(',', $string) as $pair) {
|
||||
|
|
Loading…
Reference in a new issue