projects
/
php-utility-classes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9efda7d
)
don't use curly braces for string index access
author
Robert Kaiser
<kairo@kairo.at>
Sun, 9 Feb 2020 21:13:29 +0000
(22:13 +0100)
committer
Robert Kaiser
<kairo@kairo.at>
Sun, 9 Feb 2020 21:13:29 +0000
(22:13 +0100)
classes/email.php-class
patch
|
blob
|
blame
|
history
diff --git
a/classes/email.php-class
b/classes/email.php-class
index 4f35aa2054ce4d299892ac61aa22693f7933dd1e..3bbb5e940c3a60c35abb4602dc37d5fc4a840add 100644
(file)
--- a/
classes/email.php-class
+++ b/
classes/email.php-class
@@
-252,7
+252,7
@@
class email {
if (count($this->attachments)) {
// create random boundary, 20 chars, always beginning with KaiRo ;-)
$boundary = 'KaiRo';
if (count($this->attachments)) {
// create random boundary, 20 chars, always beginning with KaiRo ;-)
$boundary = 'KaiRo';
- for ($i = 1; $i <= 15; $i++)
{
+ for ($i = 1; $i <= 15; $i++) {
$r = rand(0, 61);
if ($r < 10) { $boundary .= chr($r + 48); }
elseif ($r < 36) { $boundary .= chr($r + 55); }
$r = rand(0, 61);
if ($r < 10) { $boundary .= chr($r + 48); }
elseif ($r < 36) { $boundary .= chr($r + 55); }
@@
-373,7
+373,7
@@
class email {
// encode x09,x20 at lineends
{
$iLength = strlen($sLine);
// encode x09,x20 at lineends
{
$iLength = strlen($sLine);
- $iLastChar = ord($sLine
{$iLength-1}
);
+ $iLastChar = ord($sLine
[$iLength-1]
);
// !!!!!!!!
// imap_8_bit does not encode x20 at the very end of a text,
// !!!!!!!!
// imap_8_bit does not encode x20 at the very end of a text,
@@
-383,7
+383,7
@@
class email {
if (!($bEmulate_imap_8bit && ($i==count($aLines)-1)))
if (($iLastChar==0x09)||($iLastChar==0x20)) {
if (!($bEmulate_imap_8bit && ($i==count($aLines)-1)))
if (($iLastChar==0x09)||($iLastChar==0x20)) {
- $sLine
{$iLength-1}
='=';
+ $sLine
[$iLength-1]
='=';
$sLine .= ($iLastChar==0x09)?'09':'20';
}
} // imap_8bit encodes x20 before chr(13), too
$sLine .= ($iLastChar==0x09)?'09':'20';
}
} // imap_8bit encodes x20 before chr(13), too