Opened 4 years ago
Closed 4 years ago
#50022 closed defect (bug) (duplicate)
Warning: urldecode() expects parameter 1 to be string, array given
Reported by: | krypsin | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | |
Component: | Query | Keywords: | close |
Focuses: | Cc: |
Description
Issue
Sentry has logged an issue here: https://sentry.io/share/issue/22e714bd19904fb29eb54fe8fb3c5f7b/
/wp/wp-includes/class-wp-query.php in WP_Query::get_posts at line 2203
<?php $q['author'] = addslashes_gpc( '' . urldecode( $q['author'] ) );
Warning: urldecode() expects parameter 1 to be string, array given
This happens on a fresh installation of WordPress.
To replicate
- Setup a fresh installation of WordPress (no plugins or anything extra)
- Visit the WP URL with the query
?author%5B%5D=%5BFiltered%5D3
to replicate the issue.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hello @krypsin, welcome to Trac and thanks for the ticket.
The
author
parameter only takes an integer for author_id. For arrays useauthor__in
.It seems to me the emitted warning is correct.