Make sure the state is an array

- Fix not working update script from commit 54367
This commit is contained in:
Hadi Nategh 2015-11-25 09:01:14 +00:00
parent af42a71332
commit cbfb44e551

View File

@ -2671,7 +2671,7 @@ function calendar_upgrade14_3_900()
function calendar_upgrade14_3_901() function calendar_upgrade14_3_901()
{ {
preferences::change_preference('calendar', '/^favorite_/', function($attr, $old_value, $owner) { preferences::change_preference('calendar', '/^favorite_/', function($attr, $old_value, $owner) {
if($old_value['state']) if($old_value['state'] && is_array($old_value['state']))
{ {
unset($old_value['state']['date']); unset($old_value['state']['date']);
unset($old_value['state']['startdate']); unset($old_value['state']['startdate']);