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.
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.
- Target version set to 7.2 (Frontend)
- Is Regression set to No
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
- Target version changed from 7.4 (Backend) to 7.5
- Status changed from New to Needs Feedback
- Target version deleted (
7.5)
Care to create a patch fore that?
- 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
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
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 =]
- Status changed from Under Review to Rejected
this is closed as "not a bug" for now.
Also available in: Atom
PDF