Method name \XF\Http\Upload::isValid() is misleading

Kirby

Well-known member
Affected version
2.2.12
Method name XF\Http\Upload::isValid() indicates that the method is "read only" according to \XF\Util\Php::nameIndicatedReadOnly(), but this is not necessarily the case:

If the uploaded file is an image that needs to be rotated / flipped or resized, caling isValid() internally calls transformImage() which in fact does overwrite the original upload, eg. it does modify data.

Could this be changed so calling isValid() does not modify the originally uploaded file but instead creates a new file that will be used afterwards?
 
Back
Top Bottom