UNB Components Code Reference

UnbEnvironment::DeNulArray method

Removes NUL characters from each array key and value, recursing into sub-arrays.

private static function UnbEnvironment::DeNulArray (&$a);

Parameters

–  in/out

(array) Array to be processed

Remarks

This also removes \r characters as part of line breaks on the Windows platform.

In the past, some of PHP's functions have shown vulnerabilities against NUL values in strings passed to them. To generally eliminate any attack using this method, all of those characters are removed from user input data. They are entirely useless for normal operation anyway. The array passed to this function is modified in-place, so there is no return value and little data gets copied around.

Member of class: UnbEnvironment

Implementation file: environment.class.php, line 186

© 2011 Yves Goergen. UNB Components Homepage. Reference generated on 2011-02-22.