From 7aa6908800e9388d7fc7fdac37e8ae4ddc01ad7a Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 22 Nov 2015 21:29:57 -0500 Subject: [PATCH 01/18] Update version number to 2.7.7 --- lib/Cake/VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/VERSION.txt b/lib/Cake/VERSION.txt index 2934801ea..2fda6bd7c 100644 --- a/lib/Cake/VERSION.txt +++ b/lib/Cake/VERSION.txt @@ -17,4 +17,4 @@ // @license http://www.opensource.org/licenses/mit-license.php MIT License // +--------------------------------------------------------------------------------------------+ // //////////////////////////////////////////////////////////////////////////////////////////////////// -2.7.6 +2.7.7 From 5b098af240ef5c7c7835b67aefb1119200998110 Mon Sep 17 00:00:00 2001 From: Yasushi Ichikawa Date: Sun, 29 Nov 2015 22:42:55 +0900 Subject: [PATCH 02/18] remove extract function in the Validation::comparison --- lib/Cake/Test/Case/Utility/ValidationTest.php | 36 ------------------- lib/Cake/Utility/Validation.php | 3 -- 2 files changed, 39 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index 0339ec743..49434504d 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -917,42 +917,6 @@ class ValidationTest extends CakeTestCase { $this->assertFalse(Validation::comparison('0x02', '>=', 1.5), 'hex string data fails'); } -/** - * testComparisonAsArray method - * - * @return void - */ - public function testComparisonAsArray() { - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'is greater', 'check2' => 6))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '>', 'check2' => 6))); - $this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => 'is less', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => '<', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '>=', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'greater or equal', 'check2' => 6))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '>=', 'check2' => 6))); - $this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => 'less or equal', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 6, 'operator' => '<=', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'equal to', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '==', 'check2' => 7))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => 'not equal', 'check2' => 6))); - $this->assertTrue(Validation::comparison(array('check1' => 7, 'operator' => '!=', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 6, 'operator' => 'is greater', 'check2' => 7))); - $this->assertFalse(Validation::comparison(array('check1' => 6, 'operator' => '>', 'check2' => 7))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'is less', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '<', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 6, 'operator' => 'greater or equal', 'check2' => 7))); - $this->assertFalse(Validation::comparison(array('check1' => 6, 'operator' => '>=', 'check2' => 7))); - $this->assertFalse(Validation::comparison(array('check1' => 6, 'operator' => 'greater or equal', 'check2' => 7))); - $this->assertFalse(Validation::comparison(array('check1' => 6, 'operator' => '>=', 'check2' => 7))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'less or equal', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '<=', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'equal to', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '==', 'check2' => 6))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => 'not equal', 'check2' => 7))); - $this->assertFalse(Validation::comparison(array('check1' => 7, 'operator' => '!=', 'check2' => 7))); - } - /** * testCustom method * diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index aa4eaca4a..9e62e5bc0 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -231,9 +231,6 @@ class Validation { * @return bool Success */ public static function comparison($check1, $operator = null, $check2 = null) { - if (is_array($check1)) { - extract($check1, EXTR_OVERWRITE); - } if ((float)$check1 != $check1) { return false; From bed76acea1fd3dbab4bea202dc15d27d7132bcf3 Mon Sep 17 00:00:00 2001 From: Yasushi Ichikawa Date: Sun, 29 Nov 2015 23:37:07 +0900 Subject: [PATCH 03/18] fixed coding standards error --- lib/Cake/Utility/Validation.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index 9e62e5bc0..9f59cb57c 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -231,7 +231,6 @@ class Validation { * @return bool Success */ public static function comparison($check1, $operator = null, $check2 = null) { - if ((float)$check1 != $check1) { return false; } From 48dd778bd0eedcaaad57e81cebf74f7ebb76db9f Mon Sep 17 00:00:00 2001 From: Qing Wu Date: Wed, 2 Dec 2015 10:24:16 +1100 Subject: [PATCH 04/18] Fixed issue #7579 on the 2.7 branch --- lib/Cake/Network/CakeSocket.php | 6 +++++- lib/Cake/Test/Case/Network/CakeSocketTest.php | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Network/CakeSocket.php b/lib/Cake/Network/CakeSocket.php index 2c8e01fa3..a8626386c 100644 --- a/lib/Cake/Network/CakeSocket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -129,8 +129,12 @@ class CakeSocket { $this->disconnect(); } + $hasProtocol = strpos($this->config['host'], '://') !== false; + if ($hasProtocol) { + list($this->config['protocol'], $this->config['host']) = explode('://', $this->config['host']); + } $scheme = null; - if (!empty($this->config['protocol']) && strpos($this->config['host'], '://') === false && empty($this->config['proxy'])) { + if (!empty($this->config['protocol'])) { $scheme = $this->config['protocol'] . '://'; } diff --git a/lib/Cake/Test/Case/Network/CakeSocketTest.php b/lib/Cake/Test/Case/Network/CakeSocketTest.php index d68774fe0..e93882d06 100644 --- a/lib/Cake/Test/Case/Network/CakeSocketTest.php +++ b/lib/Cake/Test/Case/Network/CakeSocketTest.php @@ -265,6 +265,24 @@ class CakeSocketTest extends CakeTestCase { $this->Socket->enableCrypto('tls', 'client'); } +/** + * Test that protocol in the host doesn't cause cert errors. + * + * @return void + */ + public function testConnectProtocolInHost() { + $this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.'); + $configSslTls = array('host' => 'ssl://smtp.gmail.com', 'port' => 465, 'timeout' => 5); + $socket = new CakeSocket($configSslTls); + try { + $socket->connect(); + $this->assertEquals('smtp.gmail.com', $socket->config['host']); + $this->assertEquals('ssl', $socket->config['protocol']); + } catch (SocketException $e) { + $this->markTestSkipped('Cannot test network, skipping.'); + } + } + /** * _connectSocketToSslTls * From d6da07c7a9da46aeabb21609256c1ec3489d7339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=BCrth?= Date: Mon, 7 Dec 2015 12:54:39 +0100 Subject: [PATCH 05/18] Include the Code of Conduct in the 2.x branch Even though I don't think we need a CoC at all, if we have one, it should be included in all relevant branches. --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c991e2460..0917011e9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,6 +9,10 @@ CakePHP loves to welcome your contributions. There are several ways to help out: There are a few guidelines that we need contributors to follow so that we have a chance of keeping on top of things. +## Code of Conduct + +Help us keep CakePHP open and inclusive. Please read and follow our [Code of Conduct](https://github.com/cakephp/code-of-conduct/blob/master/CODE_OF_CONDUCT.md). + ## Getting Started * Make sure you have a [GitHub account](https://github.com/signup/free). From b76a235175390dc3f0c5cee2efc831fe64c76ef3 Mon Sep 17 00:00:00 2001 From: Mark S Date: Tue, 8 Dec 2015 18:21:51 +0100 Subject: [PATCH 06/18] Remove default overwrites that are useless --- lib/Cake/Controller/Component/AuthComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 56b6a06dd..b6e7c1231 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -419,7 +419,7 @@ class AuthComponent extends Component { } else { $url = $this->unauthorizedRedirect; } - $controller->redirect($url, null, true); + $controller->redirect($url); return false; } From 4a4728b44dcede3bfb257f75cd2dde0c2485a8bd Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Fri, 11 Dec 2015 10:28:53 +0100 Subject: [PATCH 07/18] Fix SSL via proxy --- lib/Cake/Network/CakeSocket.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Cake/Network/CakeSocket.php b/lib/Cake/Network/CakeSocket.php index a8626386c..0c52b61eb 100644 --- a/lib/Cake/Network/CakeSocket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -137,6 +137,9 @@ class CakeSocket { if (!empty($this->config['protocol'])) { $scheme = $this->config['protocol'] . '://'; } + if (!empty($this->config['proxy'])) { + $scheme = 'tcp://'; + } $host = $this->config['host']; if (isset($this->config['request']['uri']['host'])) { From e315fb6688f19d6599ac2db672718184263bca25 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Fri, 11 Dec 2015 14:44:46 +0100 Subject: [PATCH 08/18] Fix proxy authentication when SSL is used --- lib/Cake/Network/CakeSocket.php | 3 +++ lib/Cake/Network/Http/HttpSocket.php | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/lib/Cake/Network/CakeSocket.php b/lib/Cake/Network/CakeSocket.php index a8626386c..963456db7 100644 --- a/lib/Cake/Network/CakeSocket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -189,6 +189,9 @@ class CakeSocket { $this->config['request']['uri']['port'] . ' HTTP/1.1'; $req[] = 'Host: ' . $this->config['host']; $req[] = 'User-Agent: php proxy'; + if(!empty($this->config['proxyauth'])) { + $req[] = 'Proxy-Authorization: ' . $this->config['proxyauth']; + } fwrite($this->connection, implode("\r\n", $req) . "\r\n\r\n"); diff --git a/lib/Cake/Network/Http/HttpSocket.php b/lib/Cake/Network/Http/HttpSocket.php index 0356391b8..308487094 100644 --- a/lib/Cake/Network/Http/HttpSocket.php +++ b/lib/Cake/Network/Http/HttpSocket.php @@ -668,6 +668,13 @@ class HttpSocket extends CakeSocket { throw new SocketException(__d('cake_dev', 'The %s does not support proxy authentication.', $authClass)); } call_user_func_array("$authClass::proxyAuthentication", array($this, &$this->_proxy)); + + if (!empty($this->request['header']['Proxy-Authorization'])) { + $this->config['proxyauth'] = $this->request['header']['Proxy-Authorization']; + if ($this->request['uri']['scheme'] === 'https') { + $this->request['header'] = Hash::remove($this->request['header'], 'Proxy-Authorization'); + } + } } /** From ac50b609ac1af150670e1e702fed05fe5d741a41 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Fri, 11 Dec 2015 15:01:05 +0100 Subject: [PATCH 09/18] Added space --- lib/Cake/Network/CakeSocket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Network/CakeSocket.php b/lib/Cake/Network/CakeSocket.php index 963456db7..f4b5ed2c3 100644 --- a/lib/Cake/Network/CakeSocket.php +++ b/lib/Cake/Network/CakeSocket.php @@ -189,7 +189,7 @@ class CakeSocket { $this->config['request']['uri']['port'] . ' HTTP/1.1'; $req[] = 'Host: ' . $this->config['host']; $req[] = 'User-Agent: php proxy'; - if(!empty($this->config['proxyauth'])) { + if (!empty($this->config['proxyauth'])) { $req[] = 'Proxy-Authorization: ' . $this->config['proxyauth']; } From 077f157adf9526bee8c5ffde4ecf3e2d83e51c4c Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Sat, 12 Dec 2015 11:13:41 +0100 Subject: [PATCH 10/18] Test case for proxy authentication when request is HTTPS --- .../Network/Http/BasicAuthenticationTest.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php index f7b4d6109..b3e345d9f 100644 --- a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php +++ b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php @@ -19,6 +19,24 @@ App::uses('HttpSocket', 'Network/Http'); App::uses('BasicAuthentication', 'Network/Http'); +/** + * class TestHttpSocket + * + * @package Cake.Test.Case.Network.Http + */ +class TestHttpSocket extends HttpSocket { + +/** + * testSetProxy method + * + * @return void + */ + public function testSetProxy($proxy = null) { + $this->_proxy=$proxy; + $this->_setProxy(); + } +} + /** * BasicMethodTest class * @@ -60,4 +78,26 @@ class BasicAuthenticationTest extends CakeTestCase { $this->assertEquals('Basic bWFyazpzZWNyZXQ=', $http->request['header']['Proxy-Authorization']); } +/** + * testProxyAuthenticationSsl method + * + * @return void + */ + public function testProxyAuthenticationSsl() { + $http = new TestHttpSocket(); + $http->request['uri']['scheme'] = 'https'; + $proxy = array( + 'host' => 'localhost', + 'port' => 3128, + 'method' => 'Basic', + 'user' => 'mark', + 'pass' => 'secret' + ); + + $http->testSetProxy($proxy); + + $this->assertEquals('Basic bWFyazpzZWNyZXQ=', $http->config['proxyauth']); + $this->assertFalse(isset($http->request['header']['Proxy-Authorization'])); + } + } From e47b26aa6b230fb992c4408ad2cf3c07a6170c20 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Tue, 15 Dec 2015 16:58:12 +0100 Subject: [PATCH 11/18] Do not redefine TestHttpSocket --- lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php index b3e345d9f..741f1621b 100644 --- a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php +++ b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php @@ -20,11 +20,11 @@ App::uses('HttpSocket', 'Network/Http'); App::uses('BasicAuthentication', 'Network/Http'); /** - * class TestHttpSocket + * class TestSslHttpSocket * * @package Cake.Test.Case.Network.Http */ -class TestHttpSocket extends HttpSocket { +class TestSslHttpSocket extends HttpSocket { /** * testSetProxy method @@ -84,7 +84,7 @@ class BasicAuthenticationTest extends CakeTestCase { * @return void */ public function testProxyAuthenticationSsl() { - $http = new TestHttpSocket(); + $http = new TestSslHttpSocket(); $http->request['uri']['scheme'] = 'https'; $proxy = array( 'host' => 'localhost', From 2d178b7e10b54ea057f5eea27715770ae87f8353 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Tue, 15 Dec 2015 19:58:11 +0100 Subject: [PATCH 12/18] PHPCS fixes --- lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php index 741f1621b..7ae8349b3 100644 --- a/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php +++ b/lib/Cake/Test/Case/Network/Http/BasicAuthenticationTest.php @@ -32,9 +32,10 @@ class TestSslHttpSocket extends HttpSocket { * @return void */ public function testSetProxy($proxy = null) { - $this->_proxy=$proxy; + $this->_proxy = $proxy; $this->_setProxy(); } + } /** From c6fdcea3aac0ebc5207292683d51a0db18ce1c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgaras=20Janu=C5=A1auskas?= Date: Thu, 17 Dec 2015 22:38:35 +0200 Subject: [PATCH 13/18] Clear model cache after schema update. --- lib/Cake/Console/Command/SchemaShell.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 8589d1238..a2ddfcc0a 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -403,6 +403,9 @@ class SchemaShell extends AppShell { $this->out(); $this->out(__d('cake_console', 'Updating Database...')); $this->_run($contents, 'update', $Schema); + + Configure::write('Cache.disable', false); + Cache::clear(false, '_cake_model_'); } $this->out(__d('cake_console', 'End update.')); From 4101a96a95048396df7da149eb9da5dfe6568eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgaras=20Janu=C5=A1auskas?= Date: Fri, 18 Dec 2015 12:59:00 +0200 Subject: [PATCH 14/18] Use correct context when parsing MO file. --- lib/Cake/I18n/I18n.php | 3 ++- lib/Cake/Test/Case/I18n/I18nTest.php | 3 +++ .../test_app/Locale/nld/LC_MESSAGES/default.po | 5 ++++- .../Locale/nld_mo/LC_MESSAGES/default.mo | Bin 335 -> 392 bytes 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/Cake/I18n/I18n.php b/lib/Cake/I18n/I18n.php index 1ce5aae48..1b79fa2f8 100644 --- a/lib/Cake/I18n/I18n.php +++ b/lib/Cake/I18n/I18n.php @@ -478,6 +478,7 @@ class I18n { * * @param string $filename Binary .mo file to load * @return mixed Array of translations on success or false on failure + * @link https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html */ public static function loadMo($filename) { $translations = false; @@ -486,7 +487,6 @@ class I18n { // Binary files extracted makes non-standard local variables if ($data = file_get_contents($filename)) { $translations = array(); - $context = null; $header = substr($data, 0, 20); $header = unpack('L1magic/L1version/L1count/L1o_msg/L1o_trn', $header); extract($header); @@ -496,6 +496,7 @@ class I18n { $r = unpack("L1len/L1offs", substr($data, $o_msg + $n * 8, 8)); $msgid = substr($data, $r["offs"], $r["len"]); unset($msgid_plural); + $context = null; if (strpos($msgid, "\x04") !== false) { list($context, $msgid) = explode("\x04", $msgid); diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php index faac0e069..51ab95259 100644 --- a/lib/Cake/Test/Case/I18n/I18nTest.php +++ b/lib/Cake/Test/Case/I18n/I18nTest.php @@ -2054,6 +2054,9 @@ class I18nTest extends CakeTestCase { $this->assertSame("danspartij", __x('social gathering', 'ball')); $this->assertSame("balans", __('balance')); $this->assertSame("saldo", __x('money', 'balance')); + + // MO file is sorted by msgid, 'zoo' should be last + $this->assertSame("dierentuin", __('zoo')); } /** diff --git a/lib/Cake/Test/test_app/Locale/nld/LC_MESSAGES/default.po b/lib/Cake/Test/test_app/Locale/nld/LC_MESSAGES/default.po index dfee4f93e..9bfcc2e4b 100644 --- a/lib/Cake/Test/test_app/Locale/nld/LC_MESSAGES/default.po +++ b/lib/Cake/Test/test_app/Locale/nld/LC_MESSAGES/default.po @@ -26,4 +26,7 @@ msgstr "balans" msgctxt "money" msgid "balance" -msgstr "saldo" \ No newline at end of file +msgstr "saldo" + +msgid "zoo" +msgstr "dierentuin" diff --git a/lib/Cake/Test/test_app/Locale/nld_mo/LC_MESSAGES/default.mo b/lib/Cake/Test/test_app/Locale/nld_mo/LC_MESSAGES/default.mo index bb89fa6e9ae1b1f1848449c9ce986d282aa6232d..83a8e6273c556f0fe297ccf839b763bcf1ba87ba 100644 GIT binary patch delta 208 zcmX@l)WJMKq@J6Bfng31vjg!7AZ7vL3qULZ#8-h>7>M5iF)t7^F)}cS0%-v#tp=o- zfqWYv%?6|$pnP{A%?IRr18I=HC?L%Wq%(jt7m&^a(ja}6j0{F#fm)yd6Hox;2oL~r o!3J`Gc@Rf|3;=0jm^iDPxhg+@vLK@!cS>ezQEFaEX=WY+00cJ^A^-pY delta 149 zcmeBRKF>5kq@Do?=70zw0MYC~JQs*rfOshoO91gIAQlGV!$8an#MgmX6o{Wf>EA#a z1Oyow7}$Wc5RhgD(vm=$4@k=bX^=i0Ak7M-t$;Kakal1MS_e|-%{cLB`DA-WI{ Date: Sat, 19 Dec 2015 15:57:53 +0100 Subject: [PATCH 15/18] Fix return value in SmtpTransport --- lib/Cake/Network/Email/SmtpTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Network/Email/SmtpTransport.php b/lib/Cake/Network/Email/SmtpTransport.php index f37dadf99..144e43da4 100644 --- a/lib/Cake/Network/Email/SmtpTransport.php +++ b/lib/Cake/Network/Email/SmtpTransport.php @@ -369,7 +369,7 @@ class SmtpTransport extends AbstractTransport { if ($code[2] === '-') { continue; } - return $code[1]; + return; } throw new SocketException(__d('cake_dev', 'SMTP Error: %s', $response)); } From 479eec4148b9e99a46f2dcd8141892a9615952ef Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Sat, 19 Dec 2015 18:25:30 +0100 Subject: [PATCH 16/18] Fix doc block instead. --- lib/Cake/Network/Email/SmtpTransport.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Network/Email/SmtpTransport.php b/lib/Cake/Network/Email/SmtpTransport.php index 144e43da4..e8f71387a 100644 --- a/lib/Cake/Network/Email/SmtpTransport.php +++ b/lib/Cake/Network/Email/SmtpTransport.php @@ -340,9 +340,9 @@ class SmtpTransport extends AbstractTransport { /** * Protected method for sending data to SMTP connection * - * @param string $data data to be sent to SMTP server - * @param string|bool $checkCode code to check for in server response, false to skip - * @return void + * @param string|null $data Data to be sent to SMTP server + * @param string|bool $checkCode Code to check for in server response, false to skip + * @return string Response code * @throws SocketException */ protected function _smtpSend($data, $checkCode = '250') { @@ -369,7 +369,7 @@ class SmtpTransport extends AbstractTransport { if ($code[2] === '-') { continue; } - return; + return $code[1]; } throw new SocketException(__d('cake_dev', 'SMTP Error: %s', $response)); } From d2153ac1eb6fd5dc8d5355439b2d01ef7611461f Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Sat, 19 Dec 2015 20:07:13 +0100 Subject: [PATCH 17/18] Fix typo in doc block. --- lib/Cake/Network/Email/SmtpTransport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Network/Email/SmtpTransport.php b/lib/Cake/Network/Email/SmtpTransport.php index e8f71387a..64d0090b5 100644 --- a/lib/Cake/Network/Email/SmtpTransport.php +++ b/lib/Cake/Network/Email/SmtpTransport.php @@ -342,7 +342,7 @@ class SmtpTransport extends AbstractTransport { * * @param string|null $data Data to be sent to SMTP server * @param string|bool $checkCode Code to check for in server response, false to skip - * @return string Response code + * @return string|null The matched code, or null if nothing matched * @throws SocketException */ protected function _smtpSend($data, $checkCode = '250') { From 1b4c81ebd1c35d319f63ef2a21eaa2650d01d0a3 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 20 Dec 2015 07:51:41 -0500 Subject: [PATCH 18/18] Remove lighthttpd Attempting to install lighthttpd causes the travis build to fail. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82761958e..39a7f26cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,6 @@ before_script: - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test2;' -U postgres -d cakephp_test; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi" - chmod -R 777 ./app/tmp - - sudo apt-get install lighttpd - sh -c "if [ '$PHPCS' = '1' ]; then composer global require 'cakephp/cakephp-codesniffer:1.*'; fi" - sh -c "if [ '$PHPCS' = '1' ]; then ~/.composer/vendor/bin/phpcs --config-set installed_paths ~/.composer/vendor/cakephp/cakephp-codesniffer; fi" - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini