Project

General

Profile

Actions

Bug #46935

closed

Conditions checking for "empty" values (not set or zero) not possible

Added by Stefan Neufeind over 11 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2013-04-05
Due date:
% Done:

0%

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

Description

Works: [globalVar = GP:type = 10]
Does not work: [globalVar = GP:type = 0]

Imho we might want to behave like empty() does, so "GP:type = 0" matches in case type is zero or even if it is not set. Since checking for a zero-value was not possible until now I think this would be a backward-compatible change.

Actions #1

Updated by Mathias Schreiber almost 10 years ago

  • Target version set to 7.2 (Frontend)
  • Is Regression set to No
Actions #2

Updated by Benni Mack over 9 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Actions #3

Updated by Susanne Moog over 9 years ago

  • Target version changed from 7.4 (Backend) to 7.5
Actions #4

Updated by Benni Mack about 9 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (7.5)

Care to create a patch fore that?

Actions #5

Updated by Gerrit Code Review about 9 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43536

Actions #6

Updated by Gerrit Code Review about 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43536

Actions #7

Updated by Gerrit Code Review over 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43536

Actions #8

Updated by Gerrit Code Review over 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43536

Actions #9

Updated by Gerrit Code Review over 8 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43536

Actions #10

Updated by Oliver Hader over 8 years ago

Current evaluation (without the patch):

Condition GET/POST Result
globalVar = GP:test = &test= true
globalVar = GP:test = 0 &test= false
globalVar = GP:test = &test=0 false
globalVar = GP:test = 0 &test=0 true

Future evaluation (with the patch):

Condition GET/POST Result
globalVar = GP:test = &test= true
globalVar = GP:test = 0 &test= true
globalVar = GP:test = &test=0 true
globalVar = GP:test = 0 &test=0 true

Conclusion

With the patch, the checks are more weak concerning zero and empty values. There's no difference anymore.
However, to achieve this, conditions can be joined already:

[globalVar = GP:test = 0, GP:test =]
Actions #11

Updated by Christian Kuhn over 8 years ago

  • Status changed from Under Review to Rejected

this is closed as "not a bug" for now.

Actions

Also available in: Atom PDF