1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-04 19:51:39 +02:00

[ticket/17548] Suppress filesize errors in storage_track migration

If the file size could not be retrieved right now it will be set to 0

PHPBB-17548
This commit is contained in:
Derky
2025-09-26 15:07:12 +02:00
parent f7a677ef19
commit 812406b778

View File

@@ -130,14 +130,14 @@ class storage_track extends container_aware_migration
{
$files[] = [
'file_path' => $row['physical_filename'],
'filesize' => filesize($this->phpbb_root_path . $this->config['storage\\attachment\\config\\path'] . '/' . $row['physical_filename']),
'filesize' => @filesize($this->phpbb_root_path . $this->config['storage\\attachment\\config\\path'] . '/' . $row['physical_filename']),
];
if ($row['thumbnail'] == 1)
{
$files[] = [
'file_path' => 'thumb_' . $row['physical_filename'],
'filesize' => filesize($this->phpbb_root_path . $this->config['storage\\attachment\\config\\path'] . '/thumb_' . $row['physical_filename']),
'filesize' => @filesize($this->phpbb_root_path . $this->config['storage\\attachment\\config\\path'] . '/thumb_' . $row['physical_filename']),
];
}
@@ -170,7 +170,7 @@ class storage_track extends container_aware_migration
{
$files[] = [
'file_path' => $row['filename'],
'filesize' => filesize($this->phpbb_root_path . $this->config['storage\\backup\\config\\path'] . '/' . $row['filename']),
'filesize' => @filesize($this->phpbb_root_path . $this->config['storage\\backup\\config\\path'] . '/' . $row['filename']),
];
if (count($files) >= self::BATCH_SIZE)