Skip to content

Commit 97335f0

Browse files
committed
removed return type from Container::__call() [Closes nette/utils#338]
The fatal error appears only when a subclass extends Form/Container AND re-applies the SmartObject trait, e.g.:
1 parent fb9c584 commit 97335f0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/Forms/Container.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,11 @@ public function addContainer(string|int $name): self
604604
/********************* extension methods ****************d*g**/
605605

606606

607-
/** @param mixed[] $args */
608-
public function __call(string $name, array $args): mixed
607+
/**
608+
* @param mixed[] $args
609+
* @return mixed
610+
*/
611+
public function __call(string $name, array $args)
609612
{
610613
if (isset(self::$extMethods[$name])) {
611614
return (self::$extMethods[$name])($this, ...$args);

0 commit comments

Comments
 (0)