1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-08 00:16:24 +00:00

Fetch fix

This commit is contained in:
Loic Blot 2018-04-11 22:38:17 +02:00
parent 224aa5e7cd
commit 03e026d239
No known key found for this signature in database
GPG Key ID: EFAA458E8C153987

View File

@ -192,7 +192,7 @@ class SmsMapper extends Mapper {
->setMaxResults((int) $limit); ->setMaxResults((int) $limit);
$result = $qb->execute(); $result = $qb->execute();
while ($row = $result->fetchRow()) { while ($row = $result->fetch()) {
$messageList[$row["sms_date"]] = array( $messageList[$row["sms_date"]] = array(
"address" => $row["sms_address"], "address" => $row["sms_address"],
"mailbox" => $row["sms_mailbox"], "mailbox" => $row["sms_mailbox"],
@ -221,7 +221,7 @@ class SmsMapper extends Mapper {
); );
$result = $qb->execute(); $result = $qb->execute();
if ($row = $result->fetchRow()) if ($row = $result->fetch())
$cnt += $row["ct"]; $cnt += $row["ct"];
} }
return $cnt; return $cnt;