Skip to content

Commit 186b7ef

Browse files
committed
fix: do not create dynamic property in BaseConnection
1 parent 24f67ea commit 186b7ef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

system/Database/BaseConnection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ abstract class BaseConnection implements ConnectionInterface
336336
public function __construct(array $params)
337337
{
338338
foreach ($params as $key => $value) {
339-
$this->{$key} = $value;
339+
if (property_exists($this, $key)) {
340+
$this->{$key} = $value;
341+
}
340342
}
341343

342344
$queryClass = str_replace('Connection', 'Query', static::class);

0 commit comments

Comments
 (0)