diff --git a/templates/DonationProgress.php b/templates/DonationProgress.php
index 4c3a441c..04936cce 100644
--- a/templates/DonationProgress.php
+++ b/templates/DonationProgress.php
@@ -63,7 +63,7 @@ if($donationDrive->IsStretchEnabled){
}else{ ?>
- Help us meet our stretch goal of
= number_format($donationDrive->TargetDonationCount) ?> new patrons by = $deadline ?>
+ if($timeLeft->days <= 1){ ?>= $timeString ?> left—
Help us meet our stretch goal of
= number_format($donationDrive->TargetDonationCount) ?> new patrons }else{ ?>Help us meet our stretch goal of
= number_format($donationDrive->TargetDonationCount) ?> new patrons by = $deadline ?> } ?>
} ?>
IsStretchEnabled){ ?> style="--stretch-starting-position: = $stretchStartingPosition ?>%; --stretch-base-counter-position: = $stretchStartingPosition - 1 ?>%" } ?>>
diff --git a/www/ebooks/index.php b/www/ebooks/index.php
index c48ea1e8..17be52cb 100644
--- a/www/ebooks/index.php
+++ b/www/ebooks/index.php
@@ -1,4 +1,5 @@
+use function Safe\preg_match;
use function Safe\preg_replace;
$page = HttpInput::Int(GET, 'page') ?? 1;
diff --git a/www/projects/post.php b/www/projects/post.php
index 2544580b..84177ac6 100644
--- a/www/projects/post.php
+++ b/www/projects/post.php
@@ -38,13 +38,13 @@ try{
catch(Exceptions\DuplicateEbookException $ex){
// If the `Ebook` already exists, create the `Project` anyway.
$project->Ebook = Ebook::GetByIdentifier($project->Ebook->Identifier);
- if(!$project->Ebook->EbookPlaceholder?->IsInProgress){
+ if($project->Ebook->EbookPlaceholder !== null && !$project->Ebook->EbookPlaceholder->IsInProgress){
$project->EbookId = $project->Ebook->EbookId;
$_SESSION['is-only-ebook-project-created'] = true;
// Set the placeholder to in progress.
- $project->Ebook->EbookPlaceholder?->IsInProgress = true;
- $project->Ebook->EbookPlaceholder?->Save();
+ $project->Ebook->EbookPlaceholder->IsInProgress = true;
+ $project->Ebook->EbookPlaceholder->Save();
}
else{
// `Ebook` exists and it's not a placeholder, so really fail.