mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 06:48:41 +00:00
Check for member existence
This commit is contained in:
parent
c964ba8433
commit
aa1346e9b4
|
|
@ -589,7 +589,7 @@ abstract class DataMapperAbstract implements DataMapperInterface
|
||||||
$reflectionClass = new \ReflectionClass(get_class($obj));
|
$reflectionClass = new \ReflectionClass(get_class($obj));
|
||||||
|
|
||||||
foreach ($result as $column => $value) {
|
foreach ($result as $column => $value) {
|
||||||
if ($reflectionClass->hasProperty(static::$columns[$column]['internal'])) {
|
if (isset(static::$columns[$column]['internal']) && $reflectionClass->hasProperty(static::$columns[$column]['internal'])) {
|
||||||
$reflectionProperty = $reflectionClass->getProperty(static::$columns[$column]['internal']);
|
$reflectionProperty = $reflectionClass->getProperty(static::$columns[$column]['internal']);
|
||||||
|
|
||||||
if (!($accessible = $reflectionProperty->isPublic())) {
|
if (!($accessible = $reflectionProperty->isPublic())) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user