Skip to content

Commit 2c26e6e

Browse files
committed
fix: throw exception for non-existent properties in ChildProcess
1 parent 729a370 commit 2c26e6e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ChildProcess.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,11 @@ protected function fromRuntimeProcess($process)
149149
}
150150

151151
foreach ($process['settings'] as $key => $value) {
152-
if (property_exists($this, $key)) {
153-
$this->{$key} = $value;
152+
if (! property_exists($this, $key)) {
153+
throw new \RuntimeException("Property {$key} does not exist on ".__CLASS__);
154154
}
155+
156+
$this->{$key} = $value;
155157
}
156158

157159
return $this;

0 commit comments

Comments
 (0)