From 429ac1098c098626125ad1dbddbdb59b4fc108a3 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 6 Feb 2021 07:35:42 +0200 Subject: [PATCH] Fixed JSON syntax --- src/Appwrite/Migration/Version/V06.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Migration/Version/V06.php b/src/Appwrite/Migration/Version/V06.php index 90cdb3e2a9..60bb8d3471 100644 --- a/src/Appwrite/Migration/Version/V06.php +++ b/src/Appwrite/Migration/Version/V06.php @@ -34,8 +34,8 @@ class V06 extends Migration break; case Database::SYSTEM_COLLECTION_KEYS: if ($document->getAttribute('secret', null)) { - $json = \json_decode($document->getAttribute('secret')); - if ($json->{'data'} || $json->{'method'} || $json->{'iv'} || $json->{'tag'} || $json->{'version'}) + $json = \json_decode($document->getAttribute('secret'), true); + if ($json['data'] || $json['method'] || $json['iv'] || $json['tag'] || $json['version']) { Console::log('Secret already encrypted. Skipped: ' . $document->getId()); break;