[wp-trac] [WordPress Trac] #47987: REST API: Add handling of PHP fatal errors while resizing images after upload

WordPress Trac noreply at wordpress.org
Wed Oct 2 15:15:47 UTC 2019


#47987: REST API: Add handling of PHP fatal errors while resizing images after
upload
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:
                                                 |  TimothyBlynJacobs
     Type:  task (blessed)                       |      Status:  accepted
 Priority:  highest omg bbq                      |   Milestone:  5.3
Component:  REST API                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-unit-tests dev-      |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by TimothyBlynJacobs):

 > Some minor cleanup, also removed modification of _wp_set_upload_ref().
 It is a simple wrapper for set_transient, seems best to keep returning a
 boolean.

 We aren't handling when the set transient fails though. And since that
 function performs two tasks, we can't tell the client whether it failed
 due to their input being invalid or an internal DB error. If the transient
 wasn't saved, and an upload error occurred, they wouldn't be able to clean
 up the failed upload, no?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47987#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list