Skip to content

Commit

Permalink
DateParser: Fix "str_replace(): Passing null to parameter #3 ($subjec…
Browse files Browse the repository at this point in the history
…t) of type array|string is deprecated" (#895)

> Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/extensions/SemanticResultFormats/src/iCalendar/DateParser.php on line 33
  • Loading branch information
paladox authored Dec 29, 2024
1 parent ace37f7 commit 245acce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/iCalendar/DateParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function parseDate( TimeValue $dataValue, $isEnd = false ) {
}

$year = number_format( $year, 0, '.', '' );
$time = str_replace( ':', '', $dataValue->getTimeString( false ) );
$time = str_replace( ':', '', $dataValue->getTimeString( false ) ?? '' );

// increment by one day, compute date to cover leap years etc.
if ( ( $time == false ) && ( $isEnd ) ) {
Expand Down

0 comments on commit 245acce

Please sign in to comment.