Correctly represent boolean values in serialized data

This commit is contained in:
Daniel Berteaud 2013-10-03 09:50:20 +02:00
parent 29b3215d65
commit 80627c8ce4
1 changed files with 7 additions and 2 deletions

View File

@ -34,9 +34,14 @@ $data->{'core.notifications'} = {
'core_driver' => 'core'
}
},
'USER_EVENTS' => '1'
'USER_EVENTS' => '__true__'
};
$OUT = serialize($data);
$data = serialize($data);
# PHP::Serialization has now way to
# represent a boolean, so lets replace __true__
# manually
$data =~ s/s:8:"__true__";/b:1;/g;
$OUT = $data;
}