Skip to content

Commit eda46a8

Browse files
committed
fix eloquent model attribute resolution.
1 parent 7f9e38a commit eda46a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

application/config/application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
|
5555
*/
5656

57-
'profiler' => true,
57+
'profiler' => false,
5858

5959
/*
6060
|--------------------------------------------------------------------------

laravel/database/eloquent/model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,11 +698,11 @@ public function __call($method, $parameters)
698698
// to perform the appropriate action based on the method.
699699
if (starts_with($method, 'get_'))
700700
{
701-
return $this->attributes[substr($method, 4)];
701+
return $this->get_attribute(substr($method, 4));
702702
}
703703
elseif (starts_with($method, 'set_'))
704704
{
705-
$this->attributes[substr($method, 4)] = $parameters[0];
705+
$this->set_attribute(substr($method, 4), $parameters[0]);
706706
}
707707

708708
// Finally we will assume that the method is actually the beginning of a

0 commit comments

Comments
 (0)