1
0
Fork 0
mirror of synced 2024-06-20 03:30:30 +12:00

Fixed docs comparsion

This commit is contained in:
Eldad Fux 2021-01-30 09:33:20 +02:00
parent febc81ce3d
commit 34dd934a5c
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}

View file

@ -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');