Opened 13 months ago
Last modified 12 months ago
#59956 assigned defect (bug)
author feed having an issue on latest WP6.4 version
Reported by: | janareddy | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | major | Version: | 6.4 |
Component: | Feeds | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
Team,
The author feed Ex:(www.google.com/author/author-name/feed/) is having issue on WP6.4.
currently we are using PHP8.1 and WP6.1 on this combination author feed is working as expected.
Recently we are trying to upgrade to WP6.4 , PHP version will be same(PHP8.1) this combination is having issue on author feed.
Below is the error we are getting
Uncaught ValueError: max(): Argument #1 ($value) must contain at least one element
as per little debug it seems in feed.php
on line number 720 max()
command having issue , its expecting array but date string is passing.
please go through this link for more details https://wordpress.org/support/topic/having-an-issue-on-author-feed-on-wp-6-4/
as suggested i am raising a ticket here, could you please check this.
Change History (3)
#3
@
12 months ago
The live site (https://spearswms.com/author/janechurch/feed/ ) running on PHP 8.1 and WP 6.1
the branch we have tried is PHP 8.1 and WP6.4 (on this case we are getting error).
Hello @janareddy,
Welcome back to WordPress Core's Trac :) Thank you for opening this ticket and referencing the discussion in the support ticket.
Hmm, I'm not seeing how a string is being passed to
max()
in theget_feed_build_date()
function as$modified_times
will always be an array. But that said, the error you noted indicates$modified_times
is an empty array.Passing an empty array to
max()
is a Warning on < PHP 8 or aValueError
on >= PHP 8. See it in action https://3v4l.org/AaEOD and more information is available in the PHP manual.Looking at the code, this area of the code runs when there are posts to process.
$modified_times
will contain an array of the posts''post_modified_gmt'
values. For$modified_times
to be an empty array, the data in$wp_posts->posts
would either be empty or not have'post_modified_gmt'
field / value.I'm not seeing how this was introduced in 6.4 specifically. Wondering if the issue was existed on your site(s) previously, maybe as a PHP Warning in your server logs.
To help contributors investigate and reproduce the issue, need some more information please:
max()
in the server logs?