Skip to content

Commit

Permalink
Component: persistent parameters does not have to be initialized [Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 15, 2021
1 parent d2233b1 commit 7cefe51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Application/UI/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function loadState(array $params): void
}
$this->$name = $params[$name];
} else {
$params[$name] = $this->$name;
$params[$name] = $this->$name ?? null;
}
}
$this->params = $params;
Expand Down
2 changes: 1 addition & 1 deletion tests/UI/Presenter.link().php74.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TestPresenter extends Application\UI\Presenter
public $pbool = true;

/** @persistent */
public ?array $parrn = null;
public array $parrn;

/** @persistent */
public ?bool $pbooln = null;
Expand Down

0 comments on commit 7cefe51

Please sign in to comment.