Skip to content

Commit 5877d42

Browse files
authored
Merge pull request #21 from urosgruber/master
fix uninitialized property check before being accessed
2 parents 2270b8e + 343abf0 commit 5877d42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Health/HealthCheckDefinition.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ public function __construct(?array $data = null)
123123
} else {
124124
$this->Interval = ReadableDuration::fromDuration((string)$this->IntervalDuration);
125125
}
126-
if (null === $this->TimeoutDuration) {
126+
if (!isset($this->TimeoutDuration)) {
127127
$this->TimeoutDuration = Time::ParseDuration((string)$this->Timeout);
128128
} else {
129129
$this->Timeout = ReadableDuration::fromDuration((string)$this->TimeoutDuration);
130130
}
131-
if (null === $this->DeregisterCriticalServiceAfterDuration) {
131+
if (!isset($this->DeregisterCriticalServiceAfterDuration)) {
132132
$this->DeregisterCriticalServiceAfterDuration = Time::ParseDuration(
133133
(string)$this->DeregisterCriticalServiceAfter
134134
);

0 commit comments

Comments
 (0)