mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-10 04:03:01 +09:00
Fix remainder of unit test warnings in PHP 8.0
This commit is contained in:
parent
e368cb2f2a
commit
334b1cc277
8 changed files with 30 additions and 19 deletions
|
|
@ -690,12 +690,12 @@ class SMS
|
|||
}
|
||||
|
||||
// If message subject is not supported, prepend it to the content instead.
|
||||
if ($item->subject && !$spec[strtolower($item->type) . '_subject_supported'])
|
||||
if (isset($item->subject) && $item->subject && !$spec[strtolower($item->type) . '_subject_supported'])
|
||||
{
|
||||
$content = $item->subject . "\n" . $content;
|
||||
unset($item->subject);
|
||||
}
|
||||
elseif ($item->subject && $this->_getLengthInCharset($item->subject, $spec[strtolower($item->type) . '_max_length_in_charset']) > $spec[strtolower($item->type) . '_subject_max_length'])
|
||||
elseif (isset($item->subject) && $item->subject && $this->_getLengthInCharset($item->subject, $spec[strtolower($item->type) . '_max_length_in_charset']) > $spec[strtolower($item->type) . '_subject_max_length'])
|
||||
{
|
||||
$subject_parts = $this->_splitString($item->subject, $spec[strtolower($item->type) . '_subject_max_length'], $spec[strtolower($item->type) . '_max_length_in_charset']);
|
||||
$subject_short = array_shift($subject_parts);
|
||||
|
|
@ -750,7 +750,7 @@ class SMS
|
|||
$cloneitem = clone $item;
|
||||
|
||||
// Determine the best message type for this part.
|
||||
if ($cloneitem->type !== 'SMS' && !$cloneitem->subject)
|
||||
if ($cloneitem->type !== 'SMS' && (!isset($cloneitem->subject) || !$cloneitem->subject))
|
||||
{
|
||||
$cloneitem->type = $attachment ? 'MMS' : ($this->_getLengthInCharset($content_part, $spec['sms_max_length_in_charset']) > $spec['sms_max_length'] ? 'LMS' : 'SMS');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue