Project

General

Profile

Actions

Bug #66590

closed

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

Added by Franz Holzinger about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-04-25
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #64090: Use $this-> instead of parent:: in TyposcriptConditionsClosedBenni Mack2015-01-02

Actions
Actions #1

Updated by Markus Klein about 9 years ago

  • Status changed from New to Closed

duplicates #64090

Actions

Also available in: Atom PDF