Skip to content

Commit 7fac366

Browse files
committed
Replace time() to time class od Email class
1 parent 9167ea9 commit 7fac366

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

deptrac.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ parameters:
162162
- Entity
163163
- Events
164164
Email:
165+
- I18n
165166
- Events
166167
Entity:
167168
- I18n

system/Email/Email.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace CodeIgniter\Email;
1313

1414
use CodeIgniter\Events\Events;
15+
use CodeIgniter\I18n\Time;
1516
use Config\Mimes;
1617
use ErrorException;
1718

@@ -2038,8 +2039,8 @@ protected function sendData($data)
20382039
// See https://bugs.php.net/bug.php?id=39598 and http://php.net/manual/en/function.fwrite.php#96951
20392040
if ($result === 0) {
20402041
if ($timestamp === 0) {
2041-
$timestamp = time();
2042-
} elseif ($timestamp < (time() - $this->SMTPTimeout)) {
2042+
$timestamp = Time::now()->getTimestamp();
2043+
} elseif ($timestamp < (Time::now()->getTimestamp() - $this->SMTPTimeout)) {
20432044
$result = false;
20442045

20452046
break;

0 commit comments

Comments
 (0)