*/
function __construct(Table $table, array $data = null, $prime = false) {
$this->table = $table;
- $this->data = $data;
+ $this->data = (array) $data;
if ($prime) {
$this->prime();
*/
function __get($p) {
if (!isset($this->cell[$p])) {
- $this->cell[$p] = new Cell($this, $p, $this->data[$p]);
+ $this->cell[$p] = new Cell($this, $p, isset($this->data[$p]) ? $this->data[$p] : null);
}
return $this->cell[$p];
}