From 34dd934a5c99691c531f570eb1b84e8cbf03277a Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 30 Jan 2021 09:33:20 +0200 Subject: [PATCH] Fixed docs comparsion --- src/Appwrite/Migration/Migration.php | 3 ++- src/Appwrite/Migration/Version/V06.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index fabf968b06..1dfbbb99d5 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -90,7 +90,8 @@ abstract class Migration if (empty($new->getId())) { throw new Exception('Missing ID'); } - if (!array_diff($new->getArrayCopy(), $old)) { + + if (!array_diff_assoc($new->getArrayCopy(), $old)) { return; } diff --git a/src/Appwrite/Migration/Version/V06.php b/src/Appwrite/Migration/Version/V06.php index 686330620c..90cdb3e2a9 100644 --- a/src/Appwrite/Migration/Version/V06.php +++ b/src/Appwrite/Migration/Version/V06.php @@ -26,7 +26,7 @@ class V06 extends Migration { switch ($document->getAttribute('$collection')) { case Database::SYSTEM_COLLECTION_USERS: - if ($document->getAttribute('password-update', null)) { + if ($document->isSet('password-update')) { $document ->setAttribute('passwordUpdate', $document->getAttribute('password-update', $document->getAttribute('passwordUpdate', ''))) ->removeAttribute('password-update');