Bugfix mysql results that are boolean true (no result set) e.g. UPDATE

This commit is contained in:
Xenomporio 2022-05-17 14:52:01 +02:00
parent 4efe6ed725
commit 012796f423

View File

@ -257,6 +257,9 @@ class DB{
&& !empty($this->app->stringcleaner)) { && !empty($this->app->stringcleaner)) {
$jsarray = $this->app->stringcleaner->CheckSQLHtml($sql); $jsarray = $this->app->stringcleaner->CheckSQLHtml($sql);
} }
// Don't process boolean results (e.g. UPDATE successfull)
if ($this->results !== true) {
while( $row = @mysqli_fetch_array($this->results)) { while( $row = @mysqli_fetch_array($this->results)) {
if($jsarray) { if($jsarray) {
$j = -1; $j = -1;
@ -286,13 +289,14 @@ class DB{
$row[$k] = $this->app->stringcleaner->CleanString($v, 'nojs', $dummy); $row[$k] = $this->app->stringcleaner->CleanString($v, 'nojs', $dummy);
} }
} }
} }
} }
$data[$count] = $row; $data[$count] = $row;
$count++; $count++;
} }
@mysqli_free_result($this->results); @mysqli_free_result($this->results);
}
if($data === null) { if($data === null) {
return $data; return $data;
} }