From a9dce0b40e3a5bc004f1c9647405c779040f1971 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 10 Jun 2018 22:23:44 +0200 Subject: [PATCH] Fixes #14370 Fixes error when mysqli::fetch_array returns NULL for 'SELECT * FROM mytable WHERE 0;' Signed-off-by: William Desportes --- libraries/classes/Display/Results.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index ed4a946b3a5c..a1e4cbb504ed 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -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)