Skip to content

Commit

Permalink
Prevent non-array values being stored
Browse files Browse the repository at this point in the history
  • Loading branch information
assertchris committed Jun 6, 2017
1 parent 630202f commit b9b1ed9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public function __construct($data = null)
}
}

$this->data = $data;
if (is_array($data)) {
$this->data = $data;
}
}

public function offsetSet($key, $value)
Expand Down

0 comments on commit b9b1ed9

Please sign in to comment.