Skip to content

Commit

Permalink
FIX Do not mark changed when setting value in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 26, 2024
1 parent 26d5b11 commit cdda1b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ORM/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ public function classDescription(): ?string
public function i18n_classDescription(): ?string
{
$notDefined = 'NOT_DEFINED';
$description = _t(static::class.'.CLASS_DESCRIPTION', $this->classDescription() ?? $notDefined);
$description = _t(static::class . '.CLASS_DESCRIPTION', $this->classDescription() ?? $notDefined);
if ($description === $notDefined) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/FieldType/DBField.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function __construct(?string $name = null, array $options = [])
}
// Setting value needs to happen below the call to setOptions() in case the default value is set there
$value = $this->getDefaultValue();
$this->setValue($value);
$this->setValue($value, markChanged: false);

parent::__construct();
}
Expand Down

0 comments on commit cdda1b8

Please sign in to comment.