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(
- '
-
-
-
- |
- Total
- : 4,096 pages / 65,536 KiB
- |
-
-
-
-
- | Free pages |
- 0 |
-
-
- | Dirty pages |
- 0 |
-
-
- | Pages containing data |
- 0
- |
-
-
- | Pages to be flushed |
- 0
- |
-
-
- | Busy pages |
- 0
- |
-
-
-
-
-
-
-
- | Read requests |
- 64
- |
-
-
- | Write requests |
- 64
- |
-
-
- | Read misses |
- 32
- |
-
-
- | Write waits |
- 0
- |
-
-
- | Read misses in % |
- 50 %
- |
-
-
- | Write waits in % |
- 0 %
- |
-
-
-
-',
+ '' . "\n" .
+ ' ' . "\n" .
+ ' ' . "\n" .
+ ' ' . "\n" .
+ ' | ' . "\n" .
+ ' Total' . "\n" .
+ ' : 4,096 pages / 65,536 KiB' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' ' . "\n" .
+ ' ' . "\n" .
+ ' | Free pages | ' . "\n" .
+ ' 0 | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Dirty pages | ' . "\n" .
+ ' 0 | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Pages containing data | ' . "\n" .
+ ' 0' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Pages to be flushed | ' . "\n" .
+ ' 0' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Busy pages | ' . "\n" .
+ ' 0' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ '
' . "\n" . "\n" .
+ '' . "\n" .
+ ' ' . "\n" .
+ ' ' . "\n" .
+ ' ' . "\n" .
+ ' | Read requests | ' . "\n" .
+ ' 64' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Write requests | ' . "\n" .
+ ' 64' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Read misses | ' . "\n" .
+ ' 32' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Write waits | ' . "\n" .
+ ' 0' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Read misses in % | ' . "\n" .
+ ' 50 %' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\n" .
+ ' | Write waits in % | ' . "\n" .
+ ' 0 %' . "\n" .
+ ' | ' . "\n" .
+ '
' . "\n" .
+ ' ' . "\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',
],