|
@@ -222,7 +222,12 @@ class OtPageRepository
|
|
|
{
|
|
{
|
|
|
// Check if the current be-user has a db_mountpoint, and only has one.
|
|
// Check if the current be-user has a db_mountpoint, and only has one.
|
|
|
// If so, this will be considered as the selected site (since its the only one available)
|
|
// If so, this will be considered as the selected site (since its the only one available)
|
|
|
- $mountpoints = $GLOBALS['BE_USER']->returnWebmounts();
|
|
|
|
|
|
|
+ $be_user = $GLOBALS['BE_USER'];
|
|
|
|
|
+ if ($be_user == null) {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $mountpoints = $be_user->returnWebmounts();
|
|
|
$mountpoints = array_filter($mountpoints, function($m) { return $m != 0; });
|
|
$mountpoints = array_filter($mountpoints, function($m) { return $m != 0; });
|
|
|
|
|
|
|
|
return $mountpoints;
|
|
return $mountpoints;
|