[wp-trac] [WordPress Trac] #54129: Undefined index 'posts_per_page' in ajax-actions.php
WordPress Trac
noreply at wordpress.org
Tue Nov 2 18:32:38 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:
--------------------------------------------+-----------------------------
Comment (by SergeyBiryukov):
In [changeset:"51983" 51983]:
{{{
#!CommitTicketReference repository="" revision="51983"
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, circlecube, desrosj.
Merges [51982] to the 5.8 branch.
Fixes #54129.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54129#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list