Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
b0eb9a8b
Commit
b0eb9a8b
authored
Jan 05, 2013
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bugs in Eloquent.
parent
28a880b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
model.php
laravel/database/eloquent/model.php
+3
-3
No files found.
laravel/database/eloquent/model.php
View file @
b0eb9a8b
...
@@ -711,10 +711,10 @@ abstract class Model {
...
@@ -711,10 +711,10 @@ abstract class Model {
{
{
foreach
(
array
(
'attributes'
,
'relationships'
)
as
$source
)
foreach
(
array
(
'attributes'
,
'relationships'
)
as
$source
)
{
{
if
(
array_key_exists
(
$key
,
$this
->
$source
))
return
true
;
if
(
array_key_exists
(
$key
,
$this
->
{
$source
}))
return
!
empty
(
$this
->
{
$source
}[
$key
])
;
}
}
if
(
method_exists
(
$this
,
$key
))
return
tru
e
;
return
fals
e
;
}
}
/**
/**
...
@@ -727,7 +727,7 @@ abstract class Model {
...
@@ -727,7 +727,7 @@ abstract class Model {
{
{
foreach
(
array
(
'attributes'
,
'relationships'
)
as
$source
)
foreach
(
array
(
'attributes'
,
'relationships'
)
as
$source
)
{
{
unset
(
$this
->
$source
[
$key
]);
unset
(
$this
->
{
$source
}
[
$key
]);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment