Skip to content

Commit

Permalink
Check if model for DetailView is null mootensai#133
Browse files Browse the repository at this point in the history
  • Loading branch information
drew1two committed Mar 8, 2020
1 parent 11569cf commit a80d9c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crud/default/views/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@

</div>
<?php elseif(empty($rel[2])): ?>
<?="<?php if(!is_null(\$model->$name)): ?>\n"?>
<div class="row">
<h4><?= $rel[1] ?><?= "<?= " ?>' '. Html::encode($this->title) ?></h4>
</div>
Expand Down Expand Up @@ -161,6 +162,7 @@
'attributes' => $gridColumn<?= $rel[1] ?>
]);
?>
<?="<?php endif; ?>\n"?>
<?php endif; ?>
<?php endforeach; ?>
</div>

0 comments on commit a80d9c7

Please sign in to comment.