Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
297
Merge Requests
42
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
ce560990
Commit
ce560990
authored
1 hour ago
by
Emiliano Balbuena
Browse files
Options
Download
(chore): Change trigger_error() to error_log() on MagicAttributes
parent
5f0bdfaa
goal/withdrawals-approval
Pipeline
#95677079
failed with stages
in 3 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
Traits/MagicAttributes.php
View file @
ce560990
...
...
@@ -22,11 +22,12 @@ trait MagicAttributes
$attribute
=
lcfirst
(
$attribute
);
if
(
!
property_exists
(
$this
,
$attribute
))
{
trigger_error
(
sprintf
(
"Attribute %s is not defined in %s"
,
error_log
(
sprintf
(
"Attribute %s is not defined in %s
(%s)
"
,
$attribute
,
get_class
(
$this
)
),
E_USER_WARNING
);
get_class
(
$this
),
$name
));
}
$this
->
$attribute
=
$args
[
0
];
...
...
@@ -42,11 +43,12 @@ trait MagicAttributes
$attribute
=
lcfirst
(
$attribute
);
if
(
!
property_exists
(
$this
,
$attribute
))
{
trigger_error
(
sprintf
(
"Attribute %s is not defined in %s"
,
error_log
(
sprintf
(
"Attribute %s is not defined in %s
(%s)
"
,
$attribute
,
get_class
(
$this
)
),
E_USER_WARNING
);
get_class
(
$this
),
$name
));
}
return
$this
->
$attribute
;
...
...
@@ -55,21 +57,23 @@ trait MagicAttributes
$attribute
=
lcfirst
(
$attribute
);
if
(
!
property_exists
(
$this
,
$attribute
))
{
trigger_error
(
sprintf
(
"Attribute %s is not defined in %s"
,
error_log
(
sprintf
(
"Attribute %s is not defined in %s
(%s)
"
,
$attribute
,
get_class
(
$this
)
),
E_USER_WARNING
);
get_class
(
$this
),
$name
));
}
return
(
bool
)
$this
->
$attribute
;
}
elseif
(
strpos
(
$name
,
'has'
,
0
)
===
0
)
{
if
(
!
property_exists
(
$this
,
$name
))
{
trigger_error
(
sprintf
(
"Attribute %s is not defined in %s"
,
error_log
(
sprintf
(
"Attribute %s is not defined in %s
(%s)
"
,
$name
,
get_class
(
$this
)
),
E_USER_WARNING
);
get_class
(
$this
),
$name
));
}
return
(
bool
)
$this
->
$name
;
...
...
This diff is collapsed.
Please
register
or
sign in
to comment