diff --git a/libraries/plugins/export/ExportSql.php b/libraries/plugins/export/ExportSql.php index 5a21eef6a0..9ea8dcbc9f 100644 --- a/libraries/plugins/export/ExportSql.php +++ b/libraries/plugins/export/ExportSql.php @@ -1478,7 +1478,9 @@ class ExportSql extends ExportPlugin if ($tmp_error) { $message = sprintf(__('Error reading structure for table %s:'), "$db.$table"); $message .= ' ' . $tmp_error; - trigger_error($message, E_USER_ERROR); + if (! defined('TESTSUITE')) { + trigger_error($message, E_USER_ERROR); + } return $this->_exportComment($message); } @@ -2188,7 +2190,9 @@ class ExportSql extends ExportPlugin if ($tmp_error) { $message = sprintf(__('Error reading data for table %s:'), "$db.$table"); $message .= ' ' . $tmp_error; - trigger_error($message, E_USER_ERROR); + if (! defined('TESTSUITE')) { + trigger_error($message, E_USER_ERROR); + } return PMA_exportOutputHandler( $this->_exportComment($message) ); diff --git a/test/classes/plugin/export/ExportSqlTest.php b/test/classes/plugin/export/ExportSqlTest.php index 18c80d3f47..1993131029 100644 --- a/test/classes/plugin/export/ExportSqlTest.php +++ b/test/classes/plugin/export/ExportSqlTest.php @@ -1175,7 +1175,7 @@ class ExportSqlTest extends PMATestCase ); $this->assertContains( - '-- in use(error occurred)', + '-- Error reading structure for table db.table: error occurred', $result ); } @@ -1767,7 +1767,7 @@ class ExportSqlTest extends PMATestCase $result = ob_get_clean(); $this->assertContains( - "-- Error reading data: (err)\n", + '-- Error reading data for table db.table: err', $result ); }