fix(Attach.php): Trying to access array offset on value of type null

This commit is contained in:
Roman Kelesidis 2025-08-06 10:08:12 +03:00
commit c1d3160281
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4

View file

@ -788,9 +788,10 @@ class Attach
} }
DB()->sql_freeresult($result); DB()->sql_freeresult($result);
$allowed_filesize = $row['max_filesize'] ?: $attach_config['max_filesize']; $allowed_filesize = $row['max_filesize'] ?? $attach_config['max_filesize'];
$cat_id = (int)$row['cat_id']; $cat_id = isset($row['cat_id']) ? (int)$row['cat_id'] : 0;
$auth_cache = trim($row['forum_permissions']); $auth_cache = isset($row['forum_permissions']) ? trim($row['forum_permissions']) : '';
$row['allow_group'] = $row['allow_group'] ?? 0;
// check Filename // check Filename
if (preg_match("#[\\/:*?\"<>|]#i", $this->filename)) { if (preg_match("#[\\/:*?\"<>|]#i", $this->filename)) {