From: <jfi...@us...> - 2002-11-27 02:42:40
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1:/tmp/cvs-serv14444/core Modified Files: helper_api.php Log Message: * helper_api.php (is_blank): add comment, rename parameters, remove isset() check since we don't see the need for doing that here, lowercase TRUE and FALSE Index: helper_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/helper_api.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- helper_api.php 24 Nov 2002 20:43:49 -0000 1.26 +++ helper_api.php 27 Nov 2002 02:42:37 -0000 1.27 @@ -282,13 +282,13 @@ trigger_error( $p_string, NOTICE ); } - function is_blank( $var ) { - if ( ! isset( $var ) ) { - return TRUE; - } - if ( strlen( trim( $var ) ) == 0 ) { - return TRUE; + # -------------------- + # Return true if the parameter is an empty string or a string + # containing only whitespace, false otherwise + function is_blank( $p_var ) { + if ( strlen( trim( $p_var ) ) == 0 ) { + return true; } - return FALSE; + return false; } ?> |