functions.inc.php:

- db_get_boolean(): allow 0 and 1 as parameters, not only boolean true/false


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1222 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 13 years ago
parent 7fd57740cd
commit 53d720a569

@ -1546,7 +1546,7 @@ function db_connect ($ignore_errors = 0) {
* @return String or int as appropriate.
*/
function db_get_boolean($bool) {
if(!is_bool($bool)) {
if(! (is_bool($bool) || $bool == '0' || $bool == '1') ) {
die("Invalid usage of 'db_get_boolean($bool)'");
}

Loading…
Cancel
Save