$width = $height = null;
if ($isImage) {
- [$width, $height] = \getimagesize($pathname);
+ try {
+ [$width, $height] = \getimagesize($pathname);
+ } catch (\Throwable) {
+ return null;
+ }
}
$fileAction = new FileAction([], 'create', ['data' => [
use wcf\data\attachment\AttachmentEditor;
use wcf\data\attachment\AttachmentList;
use wcf\data\file\FileEditor;
-use wcf\system\database\exception\DatabaseQueryException;
-use wcf\system\exception\SystemException;
-use wcf\system\database\exception\DatabaseQueryExecutionException;
-use wcf\system\database\exception\DatabaseTransactionException;
use wcf\system\WCF;
/**