mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Match SP as per rfc2821
This commit is contained in:
parent
c1824071c9
commit
0ae225615c
2 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,7 @@ class SmtpTransport extends AbstractTransport {
|
|||
protected function _bufferResponseLines(array $responseLines) {
|
||||
$response = array();
|
||||
foreach ($responseLines as $responseLine) {
|
||||
if (preg_match('/^(\d{3})(?:[\s\-]+(.*))?$/', $responseLine, $match)) {
|
||||
if (preg_match('/^(\d{3})(?:[ -]+(.*))?$/', $responseLine, $match)) {
|
||||
$response[] = array(
|
||||
'code' => $match[1],
|
||||
'message' => isset($match[2]) ? $match[2] : null
|
||||
|
|
|
@ -431,6 +431,7 @@ class SmtpTransportTest extends CakeTestCase {
|
|||
public function testBufferResponseLines() {
|
||||
$reponseLines = array(
|
||||
'123',
|
||||
"456\tFOO",
|
||||
'FOOBAR',
|
||||
'250-PIPELINING',
|
||||
'250-ENHANCEDSTATUSCODES',
|
||||
|
|
Loading…
Reference in a new issue