Warning: filesize(): stat failed when file is not available on the filesystem

Created on 8 September 2023, 10 months ago
Updated 24 September 2023, 9 months ago

Problem/Motivation

When using a database backup from a different environment, referenced files may be missing from the file system. This produces PHP warnings:

Warning: filesize(): stat failed for /[...]/sites/default/files/styles/image_770x510/public/ub_uithof_studerende_jongen_tussen_boekenkasten-1600x1067.jpg in views_rss_media_preprocess_item_content()

Proposed resolution

Add a sanity check before checking the file size.

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands idebr

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024