Project

General

Profile

Actions

Bug #64506

closed

sysExt:Form Validation broken

Added by Stephan Ude over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2015-01-26
Due date:
% Done:

100%

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

Description

This bug does not occur in the latest release 6.2.9. It's only present in the latest version from the 6.2 branch.

When using the email validation on a field, I get this error when I try to show the form in FE:

Fatal error: Undefined class constant 'LOCALISATION_OBJECT_NAME' in [...]/typo3/sysext/form/Classes/Validation/AbstractValidator.php

I've had a quick look into this. The actual class of the object was EmailValidator. The constant LOCALISATION_OBJECT_NAME is defined inside this class.

The lines causing the trouble are:

protected function getLocalLanguageLabel($type) {
    $label = self::LOCALISATION_OBJECT_NAME . '.' . $type;
    $message = $this->localizationHandler->getLocalLanguageLabel($label);
    return $message;
}

Changing self to static seems to fix the error. The PHP documentation (actually the comments) says that self is referring to the class context in which the constant is used (AbstractValidator) while static is taking the actual class context into account (EmailValidator).

My guess is that this is a PHP version issue. Unfortunately I can't test this with PHP 5.3 or 5.4 right now. With PHP 5.5 and 5.6 I get this error.


Related issues 1 (0 open1 closed)

Precedes TYPO3 Core - Bug #65548: sysExt:Form Validation broken in 6.2.10Closed2015-03-05

Actions
Actions

Also available in: Atom PDF