Problem/Motivation
When rotating an image and clicking save on the node, Drupal throws an error and doesn't save
TypeError: Argument 3 passed to Drupal\file\FileRepository::move() must be of the type int, string given
#0 /var/www/html/web/core/modules/file/file.module(207): Drupal\file\FileRepository->move()
#1 /var/www/html/web/modules/contrib/simple_image_rotate/simple_image_rotate.module(201): file_move()
#2 /var/www/html/web/modules/contrib/simple_image_rotate/simple_image_rotate.module(142): simple_image_rotate_rotate_image()
...
Steps to reproduce
- Enable module on Drupal 9 site
- Create new node with image field
- Upload image
- Rotate image
- Save node
Proposed resolution
'FILE_EXIST_ERROR' should be the class constant, not a string.
Remaining tasks
Update code
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
sagesolutions commentedComment #3
glynster commented@sagesolutions thanks for the patch works like a charm. RTBC +1
Comment #4
oriol_e9gComment #10
afagioliComment #12
mindhunter75 commentedThank you for the patch sagesolutions, works great!