Skip to content

Commit

Permalink
Re-add PHP 7.4 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
forevermatt committed Oct 1, 2024
1 parent 8976497 commit aee1705
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions application/common/components/Emailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function sendMessageTo(
array $data = [],
int $delaySeconds = 0
) {
if ($user?->active === 'no') {
if ($user && $user->active === 'no') {
\Yii::warning([
'action' => 'send message',
'status' => 'canceled',
Expand All @@ -369,7 +369,7 @@ public function sendMessageTo(
}

$dataForEmail = ArrayHelper::merge(
$user?->getAttributesForEmail() ?? [],
$user ? $user->getAttributesForEmail() : [],
$this->otherDataForEmails,
$data
);
Expand Down
2 changes: 1 addition & 1 deletion application/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=7.4",
"ext-json": "*",
"codemix/yii2-streamlog": "^1.3",
"fillup/fake-bower-assets": "2.0.9",
Expand Down
6 changes: 3 additions & 3 deletions application/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion application/features/bootstrap/fakes/FakeEmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function getFakeEmailsSent()
public function isSubjectForMessageType(string $subject, string $messageType, ?User $user)
{
$dataForEmail = ArrayHelper::merge(
$user?->getAttributesForEmail() ?? [],
$user ? $user->getAttributesForEmail() : [],
$this->otherDataForEmails
);

Expand Down

0 comments on commit aee1705

Please sign in to comment.