diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2019-09-27 15:13:51 +0200 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-09-27 15:13:51 +0200 |
commit | ae9e03a2b19ad92ffcf02a90f648f2152c2ce09a (patch) | |
tree | 64e0d78237fb29fabefe72a097435910202cec54 /lib/Migration | |
parent | e32f4fa234e8f789883ce576bcd43f29b29f3f05 (diff) |
save as int instead of bool
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Migration')
-rw-r--r-- | lib/Migration/Version0002Date20190925000001.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Migration/Version0002Date20190925000001.php b/lib/Migration/Version0002Date20190925000001.php index 606bf810..50ea07bf 100644 --- a/lib/Migration/Version0002Date20190925000001.php +++ b/lib/Migration/Version0002Date20190925000001.php @@ -146,9 +146,9 @@ class Version0002Date20190925000001 extends SimpleMigrationStep { $streamId = $data['stream_id']; $values = json_decode($data['values'], true); - $liked = (int)((array_key_exists('liked', $values)) ? $values['liked'] : 0); - $boosted = (int)((array_key_exists('boosted', $values)) ? $values['boosted'] : 0); - $replied = (int)((array_key_exists('replied', $values)) ? $values['replied'] : 0); + $liked = (array_key_exists('liked', $values) && ($values['liked'])) ? 1 : 0; + $boosted = (array_key_exists('boosted', $values) && $values['boosted']) ? 1 : 0; + $replied = (array_key_exists('replied', $values) && $values['replied']) ? 1 : 0; $update->set('actor_id_prim', $update->createNamedParameter(hash('sha512', $actorId))); $update->set('stream_id_prim', $update->createNamedParameter(hash('sha512', $streamId))); |