From 0a2e3252293a38c05974ef503293a1d18d1b4ad0 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 7 Oct 2020 16:58:48 +0200 Subject: [PATCH] Bugfix in merging settings --- src/danog/MadelineProto/SettingsAbstract.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/danog/MadelineProto/SettingsAbstract.php b/src/danog/MadelineProto/SettingsAbstract.php index e0130584..71ac60d2 100644 --- a/src/danog/MadelineProto/SettingsAbstract.php +++ b/src/danog/MadelineProto/SettingsAbstract.php @@ -44,7 +44,10 @@ abstract class SettingsAbstract if (isset($other->{$name}) && ( !isset($defaults[$name]) - || $other->{$name} !== $defaults[$name] // Isn't equal to the default value + || ( + $other->{$name} !== $defaults[$name] // Isn't equal to the default value + || $other->{$name} !== $this->{$name} // Is equal, but current value is not the default one + ) ) && $other->{$name} !== $this->{$name} ) {