mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 17:48:51 +01:00
Fix PHP warnings for PHP 8 compatability
This commit is contained in:
parent
45d77b594d
commit
16278dd064
@ -2745,7 +2745,7 @@ class Contacts extends Contacts\Storage
|
||||
header('Content-length: '.bytes($contact['jpegphoto']));
|
||||
echo $contact['jpegphoto'];
|
||||
}
|
||||
else
|
||||
elseif ($url)
|
||||
{
|
||||
header('Content-length: '.$size);
|
||||
readfile($url);
|
||||
|
@ -204,6 +204,7 @@ class File extends Etemplate\Widget
|
||||
);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -247,7 +248,7 @@ class File extends Etemplate\Widget
|
||||
}
|
||||
fclose($fp);
|
||||
} else {
|
||||
_log('cannot create the destination file');
|
||||
error_log(__METHOD__ . ' cannot create the destination file "'.$new_file.'"');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -307,7 +308,7 @@ class File extends Etemplate\Widget
|
||||
|
||||
if (!$this->is_readonly($cname, $form_name))
|
||||
{
|
||||
$value = $value_in = self::get_array($content, $form_name);
|
||||
$value = self::get_array($content, $form_name);
|
||||
$valid =& self::get_array($validated, $form_name, true);
|
||||
|
||||
if(!is_array($value)) $value = array();
|
||||
@ -317,7 +318,7 @@ class File extends Etemplate\Widget
|
||||
|
||||
foreach($value as $tmp => $file)
|
||||
{
|
||||
if(!$file) continue;
|
||||
if(!$file || !is_array($file)) continue;
|
||||
if (is_dir($GLOBALS['egw_info']['server']['temp_dir']) && is_writable($GLOBALS['egw_info']['server']['temp_dir']))
|
||||
{
|
||||
$path = $GLOBALS['egw_info']['server']['temp_dir'].'/'.$tmp;
|
||||
|
@ -348,9 +348,11 @@ class Sharing
|
||||
/**
|
||||
* Get the namespaced class for the given share
|
||||
*
|
||||
* @param string $share
|
||||
* @param array $share
|
||||
* @return string
|
||||
* @throws Exception
|
||||
*/
|
||||
protected static function get_share_class($share)
|
||||
protected static function get_share_class(array $share)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -698,7 +700,7 @@ class Sharing
|
||||
* @param String $path
|
||||
* @param boolean $writable Allow editing the shared entry / folder / file
|
||||
* @param boolean $files For sharing an application entry, allow access to the linked files
|
||||
* @param $extra Additional extra parameters
|
||||
* @param array $extra Additional extra parameters
|
||||
*/
|
||||
public static function ajax_create($action, $path, $writable = false, $files = false, $extra = array())
|
||||
{
|
||||
@ -721,7 +723,7 @@ class Sharing
|
||||
);
|
||||
|
||||
// Store share in session so Merge can find this one and not create a read-only one
|
||||
\EGroupware\Api\Cache::setSession(__CLASS__, $path, $share);
|
||||
Cache::setSession(__CLASS__, $path, $share);
|
||||
$arr = array(
|
||||
'action' => $action,
|
||||
'writable' => $writable,
|
||||
@ -745,7 +747,7 @@ class Sharing
|
||||
/**
|
||||
* Api\Storage\Base instance for egw_sharing table
|
||||
*
|
||||
* @var Api\Storage\Base
|
||||
* @var Storage\Base
|
||||
*/
|
||||
protected static $so;
|
||||
|
||||
@ -884,7 +886,7 @@ class Sharing
|
||||
* Check that the share path is still valid, and if not, delete it.
|
||||
* This should be overridden.
|
||||
*
|
||||
* @param Array share
|
||||
* @param array share
|
||||
*
|
||||
* @return boolean Is the share still valid
|
||||
*/
|
||||
@ -913,7 +915,7 @@ class Sharing
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @throws WrongParameter if you try to share a path that needs a password
|
||||
* @throws Exception\WrongParameter if you try to share a path that needs a password
|
||||
*/
|
||||
public static function path_needs_password($path)
|
||||
{
|
||||
|
@ -754,7 +754,7 @@ class TestSharing extends Api\Vfs\Sharing {
|
||||
return $sessionid;
|
||||
}
|
||||
|
||||
public static function get_share_class($share)
|
||||
public static function get_share_class(array $share)
|
||||
{
|
||||
return __CLASS__;
|
||||
}
|
||||
@ -781,7 +781,7 @@ if(!class_exists('TestHiddenSharing'))
|
||||
return $sessionid;
|
||||
}
|
||||
|
||||
public static function get_share_class($share)
|
||||
public static function get_share_class(array $share)
|
||||
{
|
||||
return __CLASS__;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user