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

Dmitry Dulepov [typo3] dmitry at typo3.org
Sun Jun 1 17:41:26 CEST 2008


Hi!

Oliver Hader wrote:
> I attached a new patch which two changes:
> * If the condition is e.g. "/^/$/" it will fail because of the unescaped 
> PREG delimiter in the middle of the pattern - this is just an additional 
> bugfix.

I afraid it makes more problems than solves. No one will write regexp as /^/$/. Normally people will write /^\/$/. Your way makes proper regexps invalid... Not acceptable I afraid :(

> * The return type of the method is boolean, but preg_match returns false 
> or the count of matches (actually 0 or 1, because preg_match will stop 
> after the first match). But the result has to be casted to (bool).

Yes, I already made the same fix locally ;)

-- 
Dmitry Dulepov
TYPO3 core team
Learn more about TYPO3! Read http://typo3bloke.net/
Skype: callto:liels_bugs but go straight to business!


More information about the TYPO3-team-core mailing list