Skip to content

Commit

Permalink
Only format pub date if we have one #262
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyfae committed Feb 13, 2022
1 parent e7428fd commit 6024f2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/admin/books/edit-book-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function book_pub_date_field($book)
$pub_date = sanitize_text_field(wp_unslash($_GET['pub_date']));
}

$pub_date = date(getParsableDateFormat(), strtotime($pub_date));
$pub_date = $pub_date ? date(getParsableDateFormat(), strtotime($pub_date)) : '';

ob_start();
?>
Expand Down

0 comments on commit 6024f2d

Please sign in to comment.