Skip to content

Commit

Permalink
PHP 8 potentially undefined variable in view
Browse files Browse the repository at this point in the history
`$siteTypeID` is not always defined so will throw
> Whoops \ Exception \ ErrorException (E_WARNING)
> Undefined variable $siteTypeID

When visiting `/dashboard/pages/types` on a fresh install in some cases.
  • Loading branch information
wordish authored Mar 28, 2024
1 parent 822e689 commit ed25ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion concrete/single_pages/dashboard/pages/types/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
} else {
?>
<p><?= t('You have not created any page types yet.'); ?></p>
<a href="<?= URL::to('/dashboard/pages/types/add', $siteTypeID); ?>" class="btn btn-primary"><?=t('Add Page Type'); ?></a>
<a href="<?= URL::to('/dashboard/pages/types/add', $siteTypeID ?? ''); ?>" class="btn btn-primary"><?=t('Add Page Type'); ?></a>
<?php
} ?>

Expand Down

0 comments on commit ed25ac1

Please sign in to comment.