mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Avoid some more PHP warnings
"Trying to access array offset on value of type null"
This commit is contained in:
parent
5ef349f057
commit
517a306756
@ -1863,11 +1863,11 @@ abstract class Merge
|
||||
protected function prefix($prefix, $placeholder, $wrap = null)
|
||||
{
|
||||
$marker = ['', ''];
|
||||
if($placeholder[0] == '{' && is_null($wrap) || $wrap[0] == '{')
|
||||
if($placeholder && $placeholder[0] == '{' && is_null($wrap) || $wrap && $wrap[0] == '{')
|
||||
{
|
||||
$marker = ['{{', '}}'];
|
||||
}
|
||||
elseif($placeholder[0] == '$' && is_null($wrap) || $wrap[0] == '$')
|
||||
elseif($placeholder && $placeholder[0] == '$' && is_null($wrap) || $wrap && $wrap[0] == '$')
|
||||
{
|
||||
$marker = ['$$', '$$'];
|
||||
}
|
||||
@ -2883,7 +2883,7 @@ abstract class Merge
|
||||
);
|
||||
|
||||
// Check for a configured preferred directory
|
||||
if(!empty($pref = $GLOBALS['egw_info']['user']['preferences'][$this->get_app()][Merge::PREF_STORE_LOCATION]) && Vfs::is_writable($pref))
|
||||
if(!empty($pref = $GLOBALS['egw_info']['user']['preferences'][$this->get_app()][Merge::PREF_STORE_LOCATION] ?? false) && Vfs::is_writable($pref))
|
||||
{
|
||||
$target = $pref;
|
||||
}
|
||||
|
@ -1900,7 +1900,7 @@ class Vfs extends Vfs\Base
|
||||
$start = '/home/'.$GLOBALS['egw_info']['user']['account_lid'];
|
||||
|
||||
// check if user specified a valid startpath in his prefs --> use it
|
||||
if (($path = $GLOBALS['egw_info']['user']['preferences']['filemanager']['startfolder']) &&
|
||||
if(($path = $GLOBALS['egw_info']['user']['preferences']['filemanager']['startfolder'] ?? '') &&
|
||||
$path[0] == '/' && self::is_dir($path) && self::check_access($path, self::READABLE))
|
||||
{
|
||||
$start = $path;
|
||||
|
Loading…
Reference in New Issue
Block a user