mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
convert numeric characters to int when unserializing json
This commit is contained in:
@@ -451,7 +451,17 @@ class searchEngine_options implements Serializable
|
||||
$value = new DateTime($value);
|
||||
}
|
||||
elseif ($value instanceof stdClass)
|
||||
$value = (array) $value;
|
||||
{
|
||||
$tmpvalue = (array) $value;
|
||||
$value = array();
|
||||
|
||||
foreach($tmpvalue as $k=>$data)
|
||||
{
|
||||
$k = ctype_digit($k) ? (int) $k : $k;
|
||||
$value[$k] = $data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->$key = $value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user