Skip to content

Commit 83212fd

Browse files
committed
Component::getParameter() $default is silently deprecated
1 parent 6cfdc1a commit 83212fd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Application/UI/Component.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,12 @@ public function saveState(array &$params): void
196196
* Returns component param.
197197
* @return mixed
198198
*/
199-
final public function getParameter(string $name, $default = null)
199+
final public function getParameter(string $name)
200200
{
201-
return $this->params[$name] ?? $default;
201+
if (func_num_args() > 1) {
202+
$default = func_get_arg(1);
203+
}
204+
return $this->params[$name] ?? $default ?? null;
202205
}
203206

204207

0 commit comments

Comments
 (0)