[various] Replace deprecated defaults() calls by ?? operator

This commit is contained in:
Hypolite Petovan 2019-10-13 12:07:27 -04:00
parent ce7b5ff6ac
commit acdd62da3e
12 changed files with 27 additions and 26 deletions

View file

@ -337,7 +337,7 @@ class qqFileUploader {
if (!isset($pathinfo['extension'])) {
Logger::warning('extension isn\'t set.', ['filename' => $filename]);
}
$ext = defaults($pathinfo, 'extension', '');
$ext = $pathinfo['extension'] ?? '';
if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){
$these = implode(', ', $this->allowedExtensions);