Issue Bug Closed

#66590replace "parent::method" calls by "$this->method"

Franz Holzinger 04/25/15, 21:40 updated 04/25/15, 21:48

Description

The usage of the PHP parent command prohibits that the call method can be overridden by extending the class.
Use ‘$this->method()’ calls instead of ‘parent::method()’ calls.

typo3_src-6.2.12/typo3/sysext/frontend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php uses this:

$result = parent::evaluateConditionCommon($key, $value);

It should instead call

$result = $this->evaluateConditionCommon($key, $value);

Then

$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Frontend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher'] = array(
...

can be used to extend this class and overwrite the method evaluateConditionCommon.
The underlying class “\TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher” is abstract. I could not use a Sys Object Array to override an abstract class.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.