Replace deprecated defaults() calls with ?? and ?: in include/ and view/

This commit is contained in:
Hypolite Petovan 2019-10-16 08:43:59 -04:00
commit 8b836189d4
11 changed files with 30 additions and 30 deletions

View file

@ -22,7 +22,7 @@ function load_page(App $a)
require 'view/theme/frio/none.php';
} else {
$template = 'view/theme/' . $a->getCurrentTheme() . '/'
. defaults($a->page, 'template', 'default' ) . '.php';
. (($a->page['template'] ?? '') ?: 'default' ) . '.php';
if (file_exists($template)) {
require_once $template;
} else {