From eb7f2375d43aeae142e10f113b7013f3348fcc7e Mon Sep 17 00:00:00 2001 From: hxtree Date: Sun, 2 Jan 2022 02:00:10 -0600 Subject: [PATCH] Fix null failback --- src/Element/AbstractElement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Element/AbstractElement.php b/src/Element/AbstractElement.php index 4d227ce..c39d15c 100644 --- a/src/Element/AbstractElement.php +++ b/src/Element/AbstractElement.php @@ -124,7 +124,7 @@ public function getId(): string } /** - * Get live arg by name + * Get live arg by name if exists * * @param string $name * @return mixed|null @@ -132,7 +132,7 @@ public function getId(): string public function getArgByName(string $name) { $args = $this->getArgs(); - return $args[$name]; + return $args[$name] ?? null; } /**