Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Commit a945c78

Browse files
committed
Adjusted call of upstream method for missing argument.
1 parent 229f50b commit a945c78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

php/WpDateTimeTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ public static function createFromPost( $post, $field = 'date' ) {
6464
public static function createFromFormat( $format, $time, $timezone = null ) {
6565

6666
/** @var \DateTimeInterface $created */
67-
$created = parent::createFromFormat( $format, $time, $timezone );
67+
$created = empty( $timezone ) ?
68+
parent::createFromFormat( $format, $time ) :
69+
parent::createFromFormat( $format, $time, $timezone );
6870

6971
if ( false === $created ) {
7072
return false;

0 commit comments

Comments
 (0)