'stristr(...)/stripos(...)/strripos(...)' could be replaced with 'strstr(...)/strpos()/strrpos()'.

This commit is contained in:
Yuriy Pikhtarev 2017-05-05 01:01:59 +03:00
parent b4d079ff10
commit eba06c0e1a
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6

View file

@ -410,7 +410,7 @@ function attachment_sync_topic($topics)
*/
function get_extension($filename)
{
if (false === stripos($filename, '.')) {
if (false === strstr($filename, '.')) {
return '';
}
$extension = strrchr(strtolower($filename), '.');