diff --git a/src/elements/User.php b/src/elements/User.php index 2caa43fd31f..e1250e22baa 100644 --- a/src/elements/User.php +++ b/src/elements/User.php @@ -2417,7 +2417,7 @@ public function afterSave(bool $isNew): void } } else { $record = new UserRecord(); - $record->id = (int)$this->id; + $record->id = $this->id; $record->active = $this->active; $record->pending = $this->pending; $record->locked = $this->locked; @@ -2426,7 +2426,7 @@ public function afterSave(bool $isNew): void $this->prepareNamesForSave(); - $record->photoId = (int)$this->photoId ?: null; + $record->photoId = $this->photoId; $record->admin = $this->admin; $record->username = $this->username; $record->fullName = $this->fullName; diff --git a/src/elements/db/ElementQuery.php b/src/elements/db/ElementQuery.php index 470fcce0624..748103b4103 100644 --- a/src/elements/db/ElementQuery.php +++ b/src/elements/db/ElementQuery.php @@ -1031,7 +1031,7 @@ public function siteId($value): static array_shift($value); $this->siteId = []; foreach (Craft::$app->getSites()->getAllSites() as $site) { - if (!in_array($site->id, $value, false)) { + if (!in_array($site->id, $value)) { $this->siteId[] = $site->id; } }