Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/2878' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/File/Transfer/Adapter/AbstractAdapter.php
	library/Zend/File/Transfer/Adapter/Http.php
	tests/ZendTest/Log/Writer/AbstractTest.php
	tests/ZendTest/Log/Writer/DbTest.php
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Decode.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ public static function splitMime($body, $boundary)
*/
public static function splitMessageStruct($message, $boundary, $EOL = Mime::LINEEND)
{
$parts = self::splitMime($message, $boundary);
$parts = static::splitMime($message, $boundary);
if (count($parts) <= 0) {
return null;
}
$result = array();
$headers = null; // "Declare" variable before the first usage "for reading"
$body = null; // "Declare" variable before the first usage "for reading"
foreach ($parts as $part) {
self::splitMessage($part, $headers, $body, $EOL);
static::splitMessage($part, $headers, $body, $EOL);
$result[] = array('header' => $headers,
'body' => $body );
}
Expand Down Expand Up @@ -155,7 +155,7 @@ public static function splitMessage($message, &$headers, &$body, $EOL = Mime::LI
*/
public static function splitContentType($type, $wantedPart = null)
{
return self::splitHeaderField($type, $wantedPart, 'type');
return static::splitHeaderField($type, $wantedPart, 'type');
}

/**
Expand Down
14 changes: 7 additions & 7 deletions src/Mime.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Mime
*/
public static function isPrintable($str)
{
return (strcspn($str, self::$qpKeysString) == strlen($str));
return (strcspn($str, static::$qpKeysString) == strlen($str));
}

/**
Expand Down Expand Up @@ -154,7 +154,7 @@ public static function encodeQuotedPrintable($str,
private static function _encodeQuotedPrintable($str)
{
$str = str_replace('=', '=3D', $str);
$str = str_replace(self::$qpKeys, self::$qpReplaceValues, $str);
$str = str_replace(static::$qpKeys, static::$qpReplaceValues, $str);
$str = rtrim($str);
return $str;
}
Expand Down Expand Up @@ -191,7 +191,7 @@ public static function encodeQuotedPrintableHeader($str, $charset,
$tmp = "";
while (strlen($str) > 0) {
$currentLine = max(count($lines)-1, 0);
$token = self::getNextQuotedPrintableToken($str);
$token = static::getNextQuotedPrintableToken($str);
$str = substr($str, strlen($token));

$tmp .= $token;
Expand Down Expand Up @@ -253,7 +253,7 @@ public static function encodeBase64Header($str,
$suffix = '?=';
$remainingLength = $lineLength - strlen($prefix) - strlen($suffix);

$encodedValue = self::encodeBase64($str, $remainingLength, $lineEnd);
$encodedValue = static::encodeBase64($str, $remainingLength, $lineEnd);
$encodedValue = str_replace($lineEnd, $suffix . $lineEnd . ' ' . $prefix, $encodedValue);
$encodedValue = $prefix . $encodedValue . $suffix;
return $encodedValue;
Expand Down Expand Up @@ -285,7 +285,7 @@ public function __construct($boundary = null)
{
// This string needs to be somewhat unique
if ($boundary === null) {
$this->boundary = '=_' . md5(microtime(1) . self::$makeUnique++);
$this->boundary = '=_' . md5(microtime(1) . static::$makeUnique++);
} else {
$this->boundary = $boundary;
}
Expand All @@ -303,10 +303,10 @@ public static function encode($str, $encoding, $EOL = self::LINEEND)
{
switch ($encoding) {
case self::ENCODING_BASE64:
return self::encodeBase64($str, self::LINELENGTH, $EOL);
return static::encodeBase64($str, self::LINELENGTH, $EOL);

case self::ENCODING_QUOTEDPRINTABLE:
return self::encodeQuotedPrintable($str, self::LINELENGTH, $EOL);
return static::encodeQuotedPrintable($str, self::LINELENGTH, $EOL);

default:
/**
Expand Down

0 comments on commit d914ee1

Please sign in to comment.