Skip to content

Commit

Permalink
Add back in have_value() function
Browse files Browse the repository at this point in the history
  • Loading branch information
jomann09 committed Jul 18, 2019
1 parent 6179873 commit 6a29fc2
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion server/includes/utils.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,25 @@ function get_xml_or_json($type, $var, $xml, $json, $xml_func = false, $default =
}



////////////////////////////////////////////////////////////////////////
// MISC FUNCTIONS
////////////////////////////////////////////////////////////////////////


if (!function_exists('have_value')) {
function have_value($var) {
if (!isset($var))
return false;
else if (is_null($var))
return false;
else if (empty($var))
return false;
else if ($var == "")
return false;
return true;
}
}


// gets value from array using default
function grab_array_var($arr, $varname, $default = "")
Expand Down

0 comments on commit 6a29fc2

Please sign in to comment.