Fixed copyFileToAbstractedPath can returns false on failure, but code assumes it throws

Xon

Well-known member
Affected version
2.2.8
Many of the places which call \XF\Util\File::copyFileToAbstractedPath assumes it will throw on error, and with most of the default providers they do. But the return of putStream can return false depending on the underlying provider at which point XF assumes things have worked.

This affects thumbnail rebuilding and likely a few other bits that call copyFileToAbstractedPath that probably need checking. I feel copyFileToAbstractedPath should throw if fs->putStream returns false.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.9).

Change log:
Always throw an exception when a file fils to copy to an abstracted file path
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom