Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jupitern committed Aug 28, 2020
1 parent 6c8cdd0 commit 582a740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Table/TableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public function value($value)
*/
public function attr($elem, $attr, $value)
{
if (!in_array($elem, $this->attrs)) {
throw new \Exception("element not available in column scope");
if (!in_array($elem, array_keys($this->attrs))) {
throw new \Exception("element {$elem} not available in column scope");
}

$this->attrs[$elem]->add($attr, $value);
Expand Down

0 comments on commit 582a740

Please sign in to comment.