Skip to content

Commit 1809064

Browse files
committed
Avoid notice in error log
1 parent c4a5719 commit 1809064

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ public function fetchAssoc($result,$fields=false) {
162162
public function fetchRow($result,$fields=false) {
163163
$values = mysqli_fetch_row($result);
164164
if ($values && $fields && !defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) {
165-
$this->convertFloatAndInt($result,$values,array_values($fields));
165+
$fields = array_values($fields);
166+
$this->convertFloatAndInt($result,$values,$fields);
166167
}
167168
return $values;
168169
}
@@ -404,7 +405,8 @@ public function fetchAssoc($result,$fields=false) {
404405
public function fetchRow($result,$fields=false) {
405406
$values = pg_fetch_row($result);
406407
if ($values && $fields) {
407-
$this->convertFloatAndInt($result,$values,array_values($fields));
408+
$fields = array_values($fields);
409+
$this->convertFloatAndInt($result,$values,$fields);
408410
}
409411
return $values;
410412
}

0 commit comments

Comments
 (0)