Robustness in function with empty input

This commit is contained in:
moodler
2004-11-23 10:25:35 +00:00
parent 0df93edd14
commit c69232269c
+3
View File
@@ -3411,6 +3411,9 @@ function raise_memory_limit ($newlimit) {
*/
function return_bytes($val) {
$val = trim($val);
if (empty($val)) {
return '';
}
$last = $val{strlen($val)-1};
switch($last) {
case 'k':