Skip to content

Commit

Permalink
Fixes #14370
Browse files Browse the repository at this point in the history
Fixes error when mysqli::fetch_array returns NULL for 'SELECT * FROM mytable WHERE 0;'

Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Jun 10, 2018
1 parent 86fcc46 commit a9dce0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/classes/Display/Results.php
Expand Up @@ -4969,6 +4969,11 @@ private function _getMultiRowOperationLinks(
$GLOBALS['dbi']->dataSeek($dt_result, $this->__get('num_rows') - 1);
$row = $GLOBALS['dbi']->fetchRow($dt_result);

// @see DbiMysqi::fetchRow & DatabaseInterface::fetchRow
if (! is_array($row)) {
$row = array();
}

// $clause_is_unique is needed by getTable() to generate the proper param
// in the multi-edit and multi-delete form
list($where_clause, $clause_is_unique, $condition_array)
Expand Down

0 comments on commit a9dce0b

Please sign in to comment.