Avoid use of assignments bare inside statements

Either use them in a subroutine call or put parentheses around the assignment.
This commit is contained in:
Alexei Sorokin
2020-09-08 12:42:51 +03:00
parent d0f96a7023
commit adc689cb15
15 changed files with 934 additions and 791 deletions

View File

@@ -2097,7 +2097,7 @@ function common_get_mime_media($type)
function common_bare_mime($mimetype)
{
$mimetype = mb_strtolower($mimetype);
if ($semicolon = mb_strpos($mimetype, ';')) {
if (($semicolon = mb_strpos($mimetype, ';')) !== false) {
$mimetype = mb_substr($mimetype, 0, $semicolon);
}
return trim($mimetype);