Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContentExtractor: Fix invalid argument type #305

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Extractor/ContentExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,13 @@ public function getNextPageUrl()
/**
* Validate and convert a date to the W3C format.
*
* @param string $date
* @param string|null $date
*
* @return string|null Formatted date using the W3C format (Y-m-d\TH:i:sP) OR null if the date is badly formatted
*/
public function validateDate($date)
{
$date = (string) $date;
$parseDate = (array) date_parse($date);

// If no year has been found during date_parse, we nuke the whole value
Expand Down