You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in...
Steps to Reproduce
Indexing a post with $post->post_date set to 0000-00-00 00:00:00 or an otherwise invalid $post->post_date value results in the $post_date variable being set to null:
Describe the bug
The
$post_date
variable passed toPost->prepare_date_items()
inPost->prepare_document()
can benull
.Post->prepare_date_items()
uses that value in astrtotime()
call. Passingnull
tostrtotime()
results in a PHP deprecation warning....Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in...
Steps to Reproduce
Indexing a post with
$post->post_date
set to0000-00-00 00:00:00
or an otherwise invalid$post->post_date
value results in the$post_date
variable being set tonull
:https://github.com/10up/ElasticPress/blob/develop/includes/classes/Indexable/Post/Post.php#L463
Code of Conduct
The text was updated successfully, but these errors were encountered: