Skip to content

Commit

Permalink
remove other unsafe hasField uses in atk4/ui
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Aug 28, 2022
1 parent ae79e8b commit ec6ac94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public function renderRow(): void
if (!is_array($columns)) {
$columns = [$columns];
}
$field = !is_int($name) && $this->model->hasField($name) ? $this->model->getField($name) : null;
$field = is_int($name) ? null : $this->model->getField($name);
foreach ($columns as $column) {
$html_tags = array_merge($column->getHtmlTags($this->model, $field), $html_tags);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Table/Column/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function getHtmlTags(Model $row, ?Field $field): array
$p = $this->page ?? [];

foreach ($this->args as $key => $val) {
if (is_numeric($key)) {
if (is_int($key)) {
$key = $val;
}

Expand Down

0 comments on commit ec6ac94

Please sign in to comment.