[wp-trac] [WordPress Trac] #54129: Undefined index 'posts_per_page' in ajax-actions.php

WordPress Trac noreply at wordpress.org
Tue Nov 2 18:28:37 UTC 2021


#54129: Undefined index 'posts_per_page' in ajax-actions.php
--------------------------------------------+-----------------------------
 Reporter:  davidwebca                      |       Owner:  SergeyBiryukov
     Type:  defect (bug)                    |      Status:  closed
 Priority:  normal                          |   Milestone:  5.8.2
Component:  Media                           |     Version:  5.8
 Severity:  normal                          |  Resolution:  fixed
 Keywords:  has-patch needs-testing commit  |     Focuses:
--------------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"51982" 51982]:
 {{{
 #!CommitTicketReference repository="" revision="51982"
 Media: Use `WP_Query::get()` method to retrieve the `posts_per_page` value
 in `wp_ajax_query_attachments()`.

 This avoids a PHP notice and ensures that a default value is always
 provided if none is set by the user.

 Follow-up to [51145], [51485].

 Props davidwebca, mukesh27.
 Fixes #54129.
 }}}

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


More information about the wp-trac mailing list