MDL-21789 fixed buggy handling of 0.00 in s()

This commit is contained in:
Petr Skoda 2010-03-10 08:47:15 +00:00
parent b16b5857f0
commit c676fe6717

View File

@ -114,7 +114,7 @@ $ALLOWED_PROTOCOLS = array('http', 'https', 'ftp', 'news', 'mailto', 'rtsp', 'te
*/
function s($var, $obsolete = false) {
if ($var == '0') { // for integer 0, boolean false, string '0'
if ($var === '0' or $var === false or $var === 0) {
return '0';
}