Skip to content

Commit de39f72

Browse files
committed
Don't restrict model's access to properties in a read-only manner
1 parent f3d5c23 commit de39f72

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,7 @@ protected function trigger(string $event, array $data)
16181618
*/
16191619
public function __get(string $name)
16201620
{
1621-
if (in_array($name, ['primaryKey', 'table', 'returnType', 'DBGroup']))
1621+
if (property_exists($this, $name))
16221622
{
16231623
return $this->{$name};
16241624
}
@@ -1639,7 +1639,7 @@ public function __get(string $name)
16391639
*
16401640
* @param string $name
16411641
*
1642-
* @return bool
1642+
* @return boolean
16431643
*/
16441644
public function __isset(string $name): bool
16451645
{

0 commit comments

Comments
 (0)