[TYPO3-core] RFC #8566: Unable to match TS condition when variable is not set

Dmitry Dulepov [typo3] dmitry at typo3.org
Sat May 31 17:20:45 CEST 2008


Hi!

This is SVN patch request.

Type: bug

Branches: 4.1, 4.2, trunk

Problem: The following perfectly valid condition does not match if "param" is not found in URL or if it is set to empty value in the URL:

[globalVar = GP:param = /^$/]

The problem is that t3lib_matchcondition::matchWild() requires non-empty string to test. No idea why but it does not make sense to have this restriction.

Solution: remove check for non-empty value in the t3lib_matchcondition::matchWild().

Note: I also reformatted the function according to coding conventions. The change is obvious, I hope no separate patch is needed.

How to test:
1. URL: http://whatever/?param=
2. TS:
===================
page.10 = TEXT
page.10.value = Not working or no "param" in URL
[globalString = GP:param = /^$/]
page.10.value = Working properly!
[global]
===================

-- 
Dmitry Dulepov
TYPO3 core team
Learn more about TYPO3! Read http://typo3bloke.net/
Skype: callto:liels_bugs but go straight to business!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 8566_unable_to_match_condition.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080531/ef9f8558/attachment.txt 


More information about the TYPO3-team-core mailing list