Use explicit comparison
See #2825
Co-Authored-By: joshuaruesweg <josh@wcflabs.de>
'filename' => $file->getFilename(),
'icon' => $file->getIconName(),
'filesize' => FileUtil::formatFilesize($file->filesize),
- 'image' => ($file->viewableImage) ? $file->getImage() : null,
+ 'image' => $file->viewableImage ? $file->getImage() : null,
'uniqueFileId' => $file->getUniqueFileId()
];
}
/** @var UploadFile $storageFile */
foreach ($storage[$internalId]['files'] as $id => $storageFile) {
- if ($storageFile->getUniqueFileId() == $uniqueFileId) {
+ if ($storageFile->getUniqueFileId() === $uniqueFileId) {
unset($storage[$internalId]['files'][$id]);
break;
}
}
foreach ($this->getFilesForInternalId($internalId) as $file) {
- if ($file->getUniqueFileId() == $uniqueFileId) {
+ if ($file->getUniqueFileId() === $uniqueFileId) {
return $file;
}
}