[wp-trac] [WordPress Trac] #45302: AJAX post but only got a 500 error - WP5.0 Beta 3

WordPress Trac noreply at wordpress.org
Mon Dec 17 00:14:31 UTC 2018


#45302: AJAX post but only got a 500 error - WP5.0 Beta 3
----------------------------------------+---------------------
 Reporter:  foreverpinetree             |       Owner:  pento
     Type:  defect (bug)                |      Status:  closed
 Priority:  normal                      |   Milestone:  5.0
Component:  Editor                      |     Version:  5.0
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch commit fixed-5.0  |     Focuses:
----------------------------------------+---------------------
Changes (by SergeyBiryukov):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"44249" 44249]:
 {{{
 #!CommitTicketReference repository="" revision="44249"
 Scripts: Fix a PHP error in admin-ajax calls.

 When making an ajax request,
 `wp_enqueue_registered_block_scripts_and_styles()` checked if `is_admin()`
 was true before accessing `$current_screen`, rather than checking if
 `$current_screen` was defined. This is usually fine, execept for in ajax
 requests.

 Props ocean90, foreverpinetree, pento.
 Merges [43893] and [43894] to trunk.
 Fixes #45302.
 }}}

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


More information about the wp-trac mailing list