bored

A micro PHP framework
git clone git://git.bitsmanent.org/bored
Log | Files | Refs | README

commit e483253a29ad96e3e864efbebd0b006fd7cdae38
parent fa1f2002e622b05bef0172757067dca7f82e8c71
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Wed, 26 Jun 2019 11:02:54 +0200

Fix return value of dbquery() when limit == 1.

Diffstat:
Mbored.php | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bored.php b/bored.php @@ -151,7 +151,7 @@ function dbquery($sql, $limit = 1, $multi = false) { $ret = $res; break; } - return $limit == 1 ? $ret[0] : $ret; + return ($limit == 1 && is_array($ret) ? $ret[0] : $ret); } function dbping($l = NULL) {