forked from Wavyzz/dolibarr
replace specific php7 code
This commit is contained in:
@@ -97,7 +97,7 @@ class Swift_Mime_Headers_ParameterizedHeader extends Swift_Mime_Headers_Unstruct
|
||||
{
|
||||
$params = $this->getParameters();
|
||||
|
||||
return $params[$parameter] ?? null;
|
||||
return isset($params[$parameter]) ? $params[$parameter] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -493,7 +493,7 @@ class Swift_Mime_SimpleMessage extends Swift_Mime_MimePart
|
||||
'%[1-5]'
|
||||
);
|
||||
|
||||
return $priority ?? 3;
|
||||
return isset($priority) ? $priority : 3;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -293,7 +293,7 @@ class Swift_Mime_SimpleMimeEntity implements Swift_Mime_CharsetObserver, Swift_M
|
||||
public function setChildren(array $children, $compoundLevel = null)
|
||||
{
|
||||
// TODO: Try to refactor this logic
|
||||
$compoundLevel = $compoundLevel ?? $this->getCompoundLevel($children);
|
||||
$compoundLevel = isset($compoundLevel) ? $compoundLevel : $this->getCompoundLevel($children);
|
||||
$immediateChildren = array();
|
||||
$grandchildren = array();
|
||||
$newContentType = $this->userContentType;
|
||||
|
||||
@@ -159,7 +159,7 @@ class Swift_Plugins_DecoratorPlugin implements Swift_Events_SendListener, Swift_
|
||||
return $this->replacements->getReplacementsFor($address);
|
||||
}
|
||||
|
||||
return $this->replacements[$address] ?? null;
|
||||
return isset($this->replacements[$address]) ? $this->replacements[$address] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -208,7 +208,7 @@ class Swift_Transport_EsmtpTransport extends Swift_Transport_AbstractSmtpTranspo
|
||||
*/
|
||||
public function getSourceIp()
|
||||
{
|
||||
return $this->params['sourceIp'] ?? null;
|
||||
return isset($this->params['sourceIp']) ? $this->params['sourceIp'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user