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;