Suppress some PHP 8.1 deprecations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
e927ebec4c
commit
30fac275c5
@ -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 = [
|
||||
|
||||
@ -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(
|
||||
|
||||
@ -47,7 +47,7 @@ EOT;
|
||||
. '<meta:generator>phpMyAdmin ' . PMA_VERSION . '</meta:generator>'
|
||||
. '<meta:initial-creator>phpMyAdmin ' . PMA_VERSION
|
||||
. '</meta:initial-creator>'
|
||||
. '<meta:creation-date>' . strftime('%Y-%m-%dT%H:%M:%S')
|
||||
. '<meta:creation-date>' . @strftime('%Y-%m-%dT%H:%M:%S')
|
||||
. '</meta:creation-date>'
|
||||
. '</office:meta>'
|
||||
. '</office:document-meta>',
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -265,6 +265,11 @@ parameters:
|
||||
count: 1
|
||||
path: libraries/classes/Controllers/Table/SearchController.php
|
||||
|
||||
-
|
||||
message: "#^Method PhpMyAdmin\\\\Controllers\\\\Table\\\\StructureController\\:\\:extractPartitionDetails\\(\\) should return array\\<array\\>\\|null but returns array\\<string, array\\<int, array\\<string, mixed\\>\\>\\|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
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
verbose="true">
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Classes">
|
||||
<testsuite name="unit">
|
||||
<directory suffix="Test.php">test/classes</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Selenium">
|
||||
<testsuite name="selenium">
|
||||
<directory suffix="Test.php">test/selenium</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
@ -2779,7 +2779,7 @@
|
||||
<code>$max_unit</code>
|
||||
</PossiblyNullArrayAccess>
|
||||
<RedundantCast occurrences="1">
|
||||
<code>(string) strftime($string)</code>
|
||||
<code>(string) @strftime($string)</code>
|
||||
</RedundantCast>
|
||||
<RedundantCastGivenDocblockType occurrences="8">
|
||||
<code>(int) $timestamp</code>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user