Skip to content

Commit

Permalink
Set all File props first before running ::setContent and ::setTransla…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
bastianallgeier committed Jun 25, 2024
1 parent 73fd231 commit e0acee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cms/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ class File extends ModelWithContent
*/
public function __construct(array $props)
{
parent::__construct($props);

if (isset($props['filename'], $props['parent']) === false) {
throw new InvalidArgumentException('The filename and parent are required');
}
Expand All @@ -95,6 +93,8 @@ public function __construct(array $props)
$this->root = null;
$this->url = $props['url'] ?? null;

parent::__construct($props);

$this->setBlueprint($props['blueprint'] ?? null);
}

Expand Down

0 comments on commit e0acee4

Please sign in to comment.