diff --git a/libraries/classes/Gis/GisMultiPolygon.php b/libraries/classes/Gis/GisMultiPolygon.php
index 64a3fffef6..4f4ff34de0 100644
--- a/libraries/classes/Gis/GisMultiPolygon.php
+++ b/libraries/classes/Gis/GisMultiPolygon.php
@@ -154,7 +154,7 @@ class GisMultiPolygon extends GisGeometry
}
}
// draw polygon
- imagefilledpolygon($image, $points_arr, count($points_arr) / 2, $color);
+ @imagefilledpolygon($image, $points_arr, count($points_arr) / 2, $color);
// mark label point if applicable
if (isset($label) && trim($label) != '' && $first_poly) {
$label_point = [
diff --git a/libraries/classes/Gis/GisPolygon.php b/libraries/classes/Gis/GisPolygon.php
index 8ceadfaf33..63f7d9ef7e 100644
--- a/libraries/classes/Gis/GisPolygon.php
+++ b/libraries/classes/Gis/GisPolygon.php
@@ -145,7 +145,7 @@ class GisPolygon extends GisGeometry
}
// draw polygon
- imagefilledpolygon($image, $points_arr, count($points_arr) / 2, $color);
+ @imagefilledpolygon($image, $points_arr, count($points_arr) / 2, $color);
// print label if applicable
if (isset($label) && trim($label) != '') {
imagestring(
diff --git a/libraries/classes/OpenDocument.php b/libraries/classes/OpenDocument.php
index 2551883805..c26e49cf1b 100644
--- a/libraries/classes/OpenDocument.php
+++ b/libraries/classes/OpenDocument.php
@@ -47,7 +47,7 @@ EOT;
. 'phpMyAdmin ' . PMA_VERSION . ''
. 'phpMyAdmin ' . PMA_VERSION
. ''
- . '' . strftime('%Y-%m-%dT%H:%M:%S')
+ . '' . @strftime('%Y-%m-%dT%H:%M:%S')
. ''
. ''
. '',
diff --git a/libraries/classes/Properties/Options/OptionsPropertyGroup.php b/libraries/classes/Properties/Options/OptionsPropertyGroup.php
index 49b4608551..04550c018f 100644
--- a/libraries/classes/Properties/Options/OptionsPropertyGroup.php
+++ b/libraries/classes/Properties/Options/OptionsPropertyGroup.php
@@ -97,11 +97,13 @@ abstract class OptionsPropertyGroup extends OptionsPropertyItem implements Count
return count($this->properties);
}
+ // phpcs:disable SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly, Squiz.WhiteSpace.FunctionSpacing
/**
* Countable interface implementation.
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return $this->getNrOfProperties();
diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php
index 7acaf42cbf..48c496aec0 100644
--- a/libraries/classes/Util.php
+++ b/libraries/classes/Util.php
@@ -793,12 +793,12 @@ class Util
$date = (string) preg_replace(
'@%[aA]@',
- $day_of_week[(int) strftime('%w', (int) $timestamp)],
+ $day_of_week[(int) @strftime('%w', (int) $timestamp)],
$format
);
$date = (string) preg_replace(
'@%[bB]@',
- $month[(int) strftime('%m', (int) $timestamp) - 1],
+ $month[(int) @strftime('%m', (int) $timestamp) - 1],
$date
);
@@ -813,7 +813,7 @@ class Util
// Can return false on windows for Japanese language
// See https://github.com/phpmyadmin/phpmyadmin/issues/15830
- $ret = strftime($date, (int) $timestamp);
+ $ret = @strftime($date, (int) $timestamp);
// Some OSes such as Win8.1 Traditional Chinese version did not produce UTF-8
// output here. See https://github.com/phpmyadmin/phpmyadmin/issues/10598
if ($ret === false
@@ -1933,7 +1933,7 @@ class Util
}
/* Do the replacement */
- return strtr((string) strftime($string), $replace);
+ return strtr((string) @strftime($string), $replace);
}
/**
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index e20858d38d..d60ff7179c 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -265,6 +265,11 @@ parameters:
count: 1
path: libraries/classes/Controllers/Table/SearchController.php
+ -
+ message: "#^Method PhpMyAdmin\\\\Controllers\\\\Table\\\\StructureController\\:\\:extractPartitionDetails\\(\\) should return array\\\\|null but returns array\\\\>\\|bool\\|int\\|string\\>\\.$#"
+ count: 1
+ path: libraries/classes/Controllers/Table/StructureController.php
+
-
message: "#^Parameter \\#1 \\$content of method PhpMyAdmin\\\\Response\\:\\:addHTML\\(\\) expects string, PhpMyAdmin\\\\Message given\\.$#"
count: 1
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 701be01216..1da347bed1 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -8,10 +8,10 @@
verbose="true">
-
+
test/classes
-
+
test/selenium
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 186017e1df..bade81f907 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -2779,7 +2779,7 @@
$max_unit
- (string) strftime($string)
+ (string) @strftime($string)
(int) $timestamp