Update base.php

This commit is contained in:
Namhyeon Go 2018-05-29 17:30:01 +09:00 committed by GitHub
parent 2223c25245
commit cf557f2101
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,9 +226,8 @@ if(!function_exists("check_function_exists")) {
if(!function_exists("get_property_value")) {
function get_property_value($prop, $obj, $ac=false) {
$result = null;
if(property_exists($obj, $prop)) {
$result = false;
if(is_object($obj) && property_exists($obj, $prop)) {
if($ac) {
$reflection = new ReflectionClass($obj);
$property = $reflection->getProperty($prop);
@ -238,11 +237,11 @@ if(!function_exists("get_property_value")) {
$result = $obj->{$prop};
}
}
return $result;
}
}
$scope = array();
set_scope("loaded", array(