Extbase reflection cache calls not existing methods. This can
happen for example if a class is refactored and an injectMethod
has been dropped.
Change-Id: I30071b53f300ef340d6c882ed40f0f67fb86c440
Fixes: #39892
Related: #39174
Releases: 6.0, 4.7
Reviewed-on: http://review.typo3.org/13864
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
$this->log('The singleton "' . $classInfo->getClassName() . '" needs a prototype in "' . $injectMethodName . '". This is often a bad code smell; often you rather want to inject a singleton.', 1);
}
- $instance->$injectMethodName($instanceToInject);
+ if (is_callable(array($instance, $injectMethodName))) {
+ $instance->$injectMethodName($instanceToInject);
+ }
}
foreach ($classInfo->getInjectProperties() as $injectPropertyName => $classNameToInject) {