Skip to content

Commit 4c46a06

Browse files
authored
Merge pull request #16 from oveleon/develop
Fix the deserialization of data with alias key from old versions
2 parents 19918c3 + a75be90 commit 4c46a06

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Resources/contao/classes/StyleManager.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,15 @@ public static function deserializeValues($arrValue){
330330
{
331331
foreach ($values as $alias => $arrItem)
332332
{
333-
$arrValue[ $arrItem['id'] ] = $arrItem['value'];
333+
if(!is_array($arrItem))
334+
{
335+
// @deprecated: to be removed in Version 3.0. (interception of storage based on the alias)
336+
$arrValue[ $alias ] = $arrItem;
337+
}
338+
else
339+
{
340+
$arrValue[ $arrItem['id'] ] = $arrItem['value'];
341+
}
334342
}
335343
}
336344

0 commit comments

Comments
 (0)