Replaced strpos() with simplified realization (#1172)

This commit is contained in:
Roman Kelesidis 2023-11-27 20:12:13 +03:00 committed by GitHub
commit 493cd910cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 24 additions and 24 deletions

View file

@ -382,7 +382,7 @@ function attachment_sync_topic($topics)
*/
function get_extension($filename)
{
if (false === strpos($filename, '.')) {
if (!str_contains($filename, '.')) {
return '';
}
$extension = strrchr(strtolower($filename), '.');