fix:使用isset判断对象属性是否存在,而不是array_key_exists

This commit is contained in:
sunxiyuan 2020-07-14 03:41:51 +08:00
parent 39735249ee
commit 5d8b6437ba

View file

@ -156,7 +156,7 @@ class Loco_mvc_View implements IteratorAggregate {
* @return bool * @return bool
*/ */
public function has( $prop ){ public function has( $prop ){
return array_key_exists($prop,$this->scope); return isset($this->scope[$prop]);
} }