改进Model类的__isset方法

This commit is contained in:
thinkphp
2016-05-30 18:16:53 +08:00
parent d36903bddc
commit 3f138c0395

View File

@@ -1175,7 +1175,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
*/
public function __isset($name)
{
if (isset($this->data[$name])) {
if (array_key_exists($name, $this->data)) {
return true;
} elseif ($this->__get($name)) {
return true;