mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 08:38:54 +01:00
Avoid some more PHP warnings
"Trying to access array offset on value of type null"
This commit is contained in:
parent
673ac0a14a
commit
b99f7dc8c4
@ -1863,11 +1863,11 @@ abstract class Merge
|
|||||||
protected function prefix($prefix, $placeholder, $wrap = null)
|
protected function prefix($prefix, $placeholder, $wrap = null)
|
||||||
{
|
{
|
||||||
$marker = ['', ''];
|
$marker = ['', ''];
|
||||||
if($placeholder[0] == '{' && is_null($wrap) || $wrap[0] == '{')
|
if($placeholder && $placeholder[0] == '{' && is_null($wrap) || $wrap && $wrap[0] == '{')
|
||||||
{
|
{
|
||||||
$marker = ['{{', '}}'];
|
$marker = ['{{', '}}'];
|
||||||
}
|
}
|
||||||
elseif($placeholder[0] == '$' && is_null($wrap) || $wrap[0] == '$')
|
elseif($placeholder && $placeholder[0] == '$' && is_null($wrap) || $wrap && $wrap[0] == '$')
|
||||||
{
|
{
|
||||||
$marker = ['$$', '$$'];
|
$marker = ['$$', '$$'];
|
||||||
}
|
}
|
||||||
@ -2883,7 +2883,7 @@ abstract class Merge
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Check for a configured preferred directory
|
// 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;
|
$target = $pref;
|
||||||
}
|
}
|
||||||
|
@ -1900,7 +1900,7 @@ class Vfs extends Vfs\Base
|
|||||||
$start = '/home/'.$GLOBALS['egw_info']['user']['account_lid'];
|
$start = '/home/'.$GLOBALS['egw_info']['user']['account_lid'];
|
||||||
|
|
||||||
// check if user specified a valid startpath in his prefs --> use it
|
// 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))
|
$path[0] == '/' && self::is_dir($path) && self::check_access($path, self::READABLE))
|
||||||
{
|
{
|
||||||
$start = $path;
|
$start = $path;
|
||||||
|
Loading…
Reference in New Issue
Block a user