diff --git a/includes/user.php b/includes/user.php index dfaa3adb0..f635094ff 100644 --- a/includes/user.php +++ b/includes/user.php @@ -188,7 +188,7 @@ function user_load_variables ( $login, $prefix ) { $GLOBALS[$prefix . 'lastname'] = $row[1]; $GLOBALS[$prefix . 'is_admin'] = $row[2]; $GLOBALS[$prefix . 'email'] = empty ( $row[3] ) ? '' : $row[3]; - if ( strlen ( $row[0] ) && strlen ( $row[1] ) ) + if ( strlen($row[0] ?? '') && strlen($row[1] ?? '') ) $GLOBALS[$prefix . 'fullname'] = "$row[0] $row[1]"; else $GLOBALS[$prefix . 'fullname'] = $login; diff --git a/includes/views.php b/includes/views.php index 45fa28326..509f22128 100644 --- a/includes/views.php +++ b/includes/views.php @@ -7,6 +7,7 @@ * @license https://gnu.org/licenses/old-licenses/gpl-2.0.html GNU GPL * @package WebCalendar */ +require_once 'includes/init.php'; /** * Initialize view variables and check permissions.