diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php index 669cec6b7f..debb7bce4a 100644 --- a/libraries/classes/DatabaseInterface.php +++ b/libraries/classes/DatabaseInterface.php @@ -794,7 +794,7 @@ class DatabaseInterface $each_tables[$table_name]['TABLE_COMMENT'] =& $each_tables[$table_name]['Comment']; - if (strtoupper($each_tables[$table_name]['Comment']) === 'VIEW' + if (strtoupper($each_tables[$table_name]['Comment'] ?? '') === 'VIEW' && $each_tables[$table_name]['Engine'] == null ) { $each_tables[$table_name]['TABLE_TYPE'] = 'VIEW'; @@ -957,7 +957,7 @@ class DatabaseInterface $databases = $this->fetchResult($sql, 'SCHEMA_NAME', null, $link); $mysql_error = $this->getError($link); - if (! count($databases) && $GLOBALS['errno']) { + if (! count($databases) && isset($GLOBALS['errno'])) { Util::mysqlDie($mysql_error, $sql); } diff --git a/test/classes/CoreTest.php b/test/classes/CoreTest.php index 16dac440a2..a92f09769f 100644 --- a/test/classes/CoreTest.php +++ b/test/classes/CoreTest.php @@ -703,18 +703,17 @@ class CoreTest extends PmaTestCase $testUri_html = htmlspecialchars($testUri); $testUri_js = Sanitize::escapeJsString($testUri); - $header = "\n\n - - - - " + $header = "\n\n - - -" + . "\n " . "\n " . "\n " . "\n " - . "\n \n -\n\n\n -"; + . "\n \n" + . "\n\n\n\n\n"; $this->expectOutputString($header); diff --git a/test/classes/Database/QbeTest.php b/test/classes/Database/QbeTest.php index 80c26be0e7..d0393ae5f5 100644 --- a/test/classes/Database/QbeTest.php +++ b/test/classes/Database/QbeTest.php @@ -599,8 +599,7 @@ class QbeTest extends PmaTestCase 'table1.deleted', ]; $this->assertEquals( - 'FROM `table1` -', + 'FROM `table1`' . "\n", $this->_callProtectedFunction( '_getSQLQuery', [['`table1`.`id`']] diff --git a/test/classes/Engines/InnodbTest.php b/test/classes/Engines/InnodbTest.php index 10e72bd2bd..2e32a66acc 100644 --- a/test/classes/Engines/InnodbTest.php +++ b/test/classes/Engines/InnodbTest.php @@ -181,82 +181,80 @@ class InnodbTest extends PmaTestCase public function testGetPageBufferpool() { $this->assertEquals( - ' - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Buffer Pool Usage -
- Total - : 4,096 pages / 65,536 KiB -
Free pages0
Dirty pages0
Pages containing data0 -
Pages to be flushed0 -
Busy pages0 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Buffer Pool Activity -
Read requests64 -
Write requests64 -
Read misses32 -
Write waits0 -
Read misses in %50 % -
Write waits in %0 % -
-', + '' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + '
' . "\n" . + ' Buffer Pool Usage' . "\n" . + '
' . "\n" . + ' Total' . "\n" . + ' : 4,096 pages / 65,536 KiB' . "\n" . + '
Free pages0
Dirty pages0
Pages containing data0' . "\n" . + '
Pages to be flushed0' . "\n" . + '
Busy pages0' . "\n" . + '
' . "\n" . "\n" . + '' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + ' ' . "\n" . + '
' . "\n" . + ' Buffer Pool Activity' . "\n" . + '
Read requests64' . "\n" . + '
Write requests64' . "\n" . + '
Read misses32' . "\n" . + '
Write waits0' . "\n" . + '
Read misses in %50 %' . "\n" . + '
Write waits in %0 %' . "\n" . + '
' . "\n", $this->object->getPageBufferpool() ); } diff --git a/test/classes/UtilTest.php b/test/classes/UtilTest.php index 570f32d1d0..889efaa4a9 100644 --- a/test/classes/UtilTest.php +++ b/test/classes/UtilTest.php @@ -2090,6 +2090,7 @@ class UtilTest extends PmaTestCase */ public function providerLocalisedDate() { + $hasJaTranslations = file_exists(LOCALE_PATH . '/cs/LC_MESSAGES/phpmyadmin.mo'); return [ [ 1227455558, @@ -2136,21 +2137,21 @@ class UtilTest extends PmaTestCase [ 1227455558, '%Y-%m-%d %H:%M:%S %a', - '2008-11-24 00:52:38 月', + $hasJaTranslations ? '2008-11-24 00:52:38 月' : '2008-11-24 00:52:38 Mon', 'Asia/Tokyo', 'ja', ], [ 1227455558, '%a %A %b %B', - '月 月 11 月 11 月', + $hasJaTranslations ? '月 月 11 月 11 月' : 'Mon Mon Nov Nov', 'Asia/Tokyo', 'ja', ], [ 1227455558, '%a %A %b %B %P', - '月 月 11 月 11 月 午前', + $hasJaTranslations ? '月 月 11 月 11 月 午前' : 'Mon Mon Nov Nov AM', 'Asia/Tokyo', 'ja', ],