Permalink
Browse files

fixing #289 caused by changes to array generation under php7.1

  • Loading branch information...
Peter Adams
Peter Adams committed Dec 28, 2017
1 parent 695d7a3 commit a3fc5b6b40cfa18e0a4bf3530f7e96ba1baa74a4
Showing with 7 additions and 8 deletions.
  1. +7 −8 plugins/db/owa_db_mysql.php
@@ -88,7 +88,7 @@
* @since owa 1.0.0
*/
class owa_db_mysql extends owa_db {
function connect() {
if ( ! $this->connection ) {
@@ -162,7 +162,7 @@ function query( $sql ) {
$this->e->debug(sprintf('Query: %s', $sql));
$this->result = '';
$this->result = array();
$this->new_result = '';
@@ -216,16 +216,15 @@ function get_results( $sql ) {
$this->query($sql);
}
$num_rows = 0;
while ( $row = @mysqli_fetch_assoc( $this->new_result ) ) {
//$this->result = array();
while ( $row = mysqli_fetch_assoc( $this->new_result ) ) {
array_push($this->result, $row);
$this->result[$num_rows] = $row;
$num_rows++;
}
if ( $this->result ) {
return $this->result;
} else {

0 comments on commit a3fc5b6

Please sign in to comment.