[TYPO3-core] FYI: #16780: PHP warning in any system BE module

Steffen Kamper info at sk-typo3.de
Mon Jan 3 17:38:35 CET 2011


Hi,

Am 30.12.2010 14:33, schrieb Jigal van Hemert:
> Hi,
>
> On 30-12-2010 14:21, Lorenz Ulrich wrote:
> As far as I can see, the problem is the strict operator for preg_match.
>> preg_match returns the number of matches, 0 and not false if there are
>> no matches:
>
> And because it returns an integer value I'd go for
> if (preg_match(....) > 0)
>
> strpos() may return a positive integer or FALSE if the string could not
> be found, so this would become:
> if (strpos(....) !== FALSE)
>

yes, my fault. Anyway it's better to use > 0 which i did now.

Committed to rev 9982

vg Steffen


More information about the TYPO3-team-core mailing list