Specify text enconding when detecting PNG media types

UTF-8 can't be used for that.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2023-12-20 10:14:41 -03:00
parent 22989ca04f
commit b333efce8b
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
2 changed files with 1 additions and 31 deletions

View File

@ -37,7 +37,7 @@ class Mime
return 'image/gif';
}
if ($len >= 4 && mb_substr($test, 0, 4) == "\x89PNG") {
if ($len >= 4 && mb_substr($test, 0, 4, '8bit') === "\x89PNG") {
return 'image/png';
}

View File

@ -6365,21 +6365,6 @@ parameters:
count: 1
path: libraries/classes/Plugins/Import/ImportOds.php
-
message: "#^Offset 'name' does not exist on SimpleXMLElement\\|null\\.$#"
count: 2
path: libraries/classes/Plugins/Import/ImportOds.php
-
message: "#^Offset 'number\\-columns…' does not exist on SimpleXMLElement\\|null\\.$#"
count: 2
path: libraries/classes/Plugins/Import/ImportOds.php
-
message: "#^Parameter \\#1 \\$cell_attrs of method PhpMyAdmin\\\\Plugins\\\\Import\\\\ImportOds\\:\\:getValue\\(\\) expects SimpleXMLElement, SimpleXMLElement\\|null given\\.$#"
count: 1
path: libraries/classes/Plugins/Import/ImportOds.php
-
message: "#^Parameter \\#1 \\$sheets of method PhpMyAdmin\\\\Plugins\\\\Import\\\\ImportOds\\:\\:iterateOverTables\\(\\) expects array\\|SimpleXMLElement, array\\|SimpleXMLElement\\|null given\\.$#"
count: 1
@ -6415,21 +6400,6 @@ parameters:
count: 1
path: libraries/classes/Plugins/Import/ImportXml.php
-
message: "#^Offset 'charset' does not exist on SimpleXMLElement\\|null\\.$#"
count: 1
path: libraries/classes/Plugins/Import/ImportXml.php
-
message: "#^Offset 'collation' does not exist on SimpleXMLElement\\|null\\.$#"
count: 1
path: libraries/classes/Plugins/Import/ImportXml.php
-
message: "#^Offset 'name' does not exist on SimpleXMLElement\\|null\\.$#"
count: 8
path: libraries/classes/Plugins/Import/ImportXml.php
-
message: "#^Parameter \\#1 \\$str1 of function strcmp expects string, array\\<int\\<0, max\\>, array\\<int\\<0, max\\>, string\\>\\|string\\>\\|string given\\.$#"
count: 1