FluidTYPO3 / vhs

TYPO3 extension VHS: Fluid ViewHelpers
https://fluidtypo3.org
Other
189 stars 228 forks source link

v:call refuses to call methods implemented by __call() #1722

Open aimeos opened 3 years ago

aimeos commented 3 years ago

If an object implements methods via the __call() magic method, v:call throws an exception that the method doesn't exist:

in /usr/www/users/oswalq/www.oswald.sh/public/typo3conf/ext/vhs/Classes/ViewHelpers/CallViewHelper.php line 75
                1356849652
            );
        }
        if (false === method_exists($object, $method)) {
            throw new \RuntimeException(
                'Method "' . $method . '" does not exist on object of type ' . get_class($object),
                1356834755
            );
        }

A solution would be to check for __call() too:

if (false === method_exists($object, $method) && false === method_exists($object, '__call')) {