Skip to content

Instantly share code, notes, and snippets.

diff --git a/CurlResponse.php b/CurlResponse.php
index dda2e62..6095fda 100644
--- a/CurlResponse.php
+++ b/CurlResponse.php
@@ -38,26 +38,47 @@ class CurlResponse {
# Headers regex
$pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
+ # Start the body
+ $this->body = $response;
<?php
echo $this->Form->input('Applicant.tel_code_id', array(
'label' => 'International Telephone Code',
'options' => $telCode,
'empty' => $applicationData['Applicant']['tel_code_id'] === null,
'selected' => $applicationData['Applicant']['tel_code_id'],
));
@renan
renan / gist:5063785
Last active December 14, 2015 09:19
diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php
index 4b14a4f..5401ea9 100644
--- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php
+++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php
@@ -6288,6 +6288,29 @@ class FormHelperTest extends CakeTestCase {
}
/**
+ * testYearAutoExpand method
+ *
@renan
renan / gist:5270437
Last active December 15, 2015 13:49
diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
index b54e4d5..316c618 100644
--- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
+++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
@@ -605,6 +605,22 @@ class HtmlHelperTest extends CakeTestCase {
}
/**
+ * testCssWithFullBase method
+ *
diff --git a/lib/Cake/Network/Email/SmtpTransport.php b/lib/Cake/Network/Email/SmtpTransport.php
index 363e477..ec48d6c 100644
--- a/lib/Cake/Network/Email/SmtpTransport.php
+++ b/lib/Cake/Network/Email/SmtpTransport.php
@@ -145,7 +145,10 @@ class SmtpTransport extends AbstractTransport {
* @throws SocketException
*/
protected function _sendRcpt() {
- $from = $this->_cakeEmail->from();
+ $from = $this->_cakeEmail->returnPath();
diff --git a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp
index e3df021..8f02af2 100644
--- a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp
+++ b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp
@@ -55,14 +55,12 @@
$this-><?php echo $currentModelName; ?>->create();
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
<?php if ($wannaUseSession): ?>
- $this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved'));
+ $this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.'));
$tz = new DateTimeZone('Europe/Amsterdam');
$dt = new DateTime('20:00', $tz);
echo $dt->format('c'); // 2013-08-21T20:00:00+02:00
[Mon Sep 16 13:38:48] ~/Sites/cakephp
renan@hephaestus ➜ composer create-project --stability=dev cakephp/app new-app
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
Installing cakephp/app (dev-master 9dc8489bc35193057109ebe511975669bec52165)
- Installing cakephp/app (dev-master master)
Cloning master
Created project in new-app
Loading composer repositories with package information
Installing dependencies (including require-dev)
diff --git a/webroot/index.php b/webroot/index.php
index 6c071ac..f77be14 100644
--- a/webroot/index.php
+++ b/webroot/index.php
@@ -22,6 +22,10 @@
// for built-in server
if (php_sapi_name() === 'cli-server') {
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
+
+ if (file_exists(__DIR__ . $_SERVER['REQUEST_URI'])) {
@renan
renan / gist:6698775
Last active December 23, 2015 21:49
language: php
php:
- 5.3
- 5.4
- 5.5
env:
global:
- CAKE_VERSION=2.5