[TYPO3-core] RFC #4272: Inconsistent return values of ini_get() produce false positives for safe_mode detection

Peter Beernink p.beernink at drecomm.nl
Fri Oct 1 21:36:48 CEST 2010


Hi

"Marcus Krause" wrote :
> Hi!
> [...]
> 
> In the patch I'd use PHP's ext/filter instead of string comparisons.
> 
> Example:
> public static function isSafeModeEnabled() {
> return filter_var(ini_get('safe_mode'), FILTER_VALIDATE_BOOLEAN,
> FILTER_REQUIRE_SCALAR | FILTER_NULL_ON_FAILURE);
> }
> 

Good point. changed the patch in accordance with your suggestion.
New file has been attached.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4272_03.diff
Type: application/octet-stream
Size: 9980 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101001/106f6df0/attachment.obj>


More information about the TYPO3-team-core mailing list