Opened 11 years ago
Closed 11 years ago
#28130 closed defect (bug) (fixed)
Saving images after editing media gives a Javascript error
Reported by: | t4k1s | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Media | Keywords: | has-patch needs-testing commit |
Focuses: | Cc: |
Description
Steps to reproduce:
When logged in the dashboard, click on media library, click edit on any image. Rotate, flip, crop or scale the image and press the save button afterwards. In the Javascript console an error appears due to a missing closing div tag.
"SyntaxError: JSON Parse error: Unrecognized token '<' load-scripts.php:39:3922
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
The parse error appears to be caused by something else.
I can only reproduce it if manually edit
wp_save_image()
orwp_save_image_file()
to emit some kind of a PHP warning, e.g. to trigger_deprecated_argument()
: tags/3.9/src/wp-admin/includes/image-edit.php#L290.The patch looks good though. The issue was introduced in [11965].