mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 13:31:38 +08:00
改进Model类的getData方法
This commit is contained in:
@@ -163,7 +163,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
*/
|
||||
public function getData($name = '')
|
||||
{
|
||||
return isset($this->data[$name]) ? $this->data[$name] : $this->data;
|
||||
return array_key_exists($name, $this->data) ? $this->data[$name] : $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user