diff --git a/lib/Cake/Console/Command/Task/BakeTask.php b/lib/Cake/Console/Command/Task/BakeTask.php index c2a3257e0..9d77e7fd4 100644 --- a/lib/Cake/Console/Command/Task/BakeTask.php +++ b/lib/Cake/Console/Command/Task/BakeTask.php @@ -79,7 +79,7 @@ class BakeTask extends AppShell { * @return void */ public function execute() { - foreach($this->args as $i => $arg) { + foreach ($this->args as $i => $arg) { if (strpos($arg, '.')) { list($this->params['plugin'], $this->args[$i]) = pluginSplit($arg); break; diff --git a/lib/Cake/Console/Command/Task/PluginTask.php b/lib/Cake/Console/Command/Task/PluginTask.php index d8ee72735..c6d37e7d3 100644 --- a/lib/Cake/Console/Command/Task/PluginTask.php +++ b/lib/Cake/Console/Command/Task/PluginTask.php @@ -159,8 +159,8 @@ class PluginTask extends AppShell { */ public function findPath($pathOptions) { $valid = false; - foreach ($pathOptions as $i =>$path) { - if(!is_dir($path)) { + foreach ($pathOptions as $i => $path) { + if (!is_dir($path)) { array_splice($pathOptions, $i, 1); } } diff --git a/lib/Cake/Console/Command/UpgradeShell.php b/lib/Cake/Console/Command/UpgradeShell.php index cf3c91858..c9d52e0bc 100644 --- a/lib/Cake/Console/Command/UpgradeShell.php +++ b/lib/Cake/Console/Command/UpgradeShell.php @@ -83,7 +83,7 @@ class UpgradeShell extends AppShell { * @return void */ public function all() { - foreach($this->OptionParser->subcommands() as $command) { + foreach ($this->OptionParser->subcommands() as $command) { $name = $command->name(); if ($name === 'all') { continue; @@ -135,7 +135,7 @@ class UpgradeShell extends AppShell { if (is_dir('plugins')) { $Folder = new Folder('plugins'); list($plugins) = $Folder->read(); - foreach($plugins as $plugin) { + foreach ($plugins as $plugin) { chdir($cwd . DS . 'plugins' . DS . $plugin); $this->locations(); } @@ -155,7 +155,7 @@ class UpgradeShell extends AppShell { 'Test' . DS . 'fixtures' => 'Test' . DS . 'Fixture', 'vendors' . DS . 'shells' . DS . 'templates' => 'Console' . DS . 'Templates', ); - foreach($moves as $old => $new) { + foreach ($moves as $old => $new) { if (is_dir($old)) { $this->out(__d('cake_console', 'Moving %s to %s', $old, $new)); if (!$this->params['dry-run']) { @@ -190,7 +190,7 @@ class UpgradeShell extends AppShell { 'checkFolder' => true, 'regex' => '@class (\S*) .*{@i' ); - foreach($sourceDirs as $dir => $options) { + foreach ($sourceDirs as $dir => $options) { if (is_numeric($dir)) { $dir = $options; $options = array(); @@ -614,7 +614,7 @@ class UpgradeShell extends AppShell { $this->_findFiles('php'); } else { $this->_files = scandir($path); - foreach($this->_files as $i => $file) { + foreach ($this->_files as $i => $file) { if (strlen($file) < 5 || substr($file, -4) !== '.php') { unset($this->_files[$i]); } diff --git a/lib/Cake/Console/HelpFormatter.php b/lib/Cake/Console/HelpFormatter.php index 6e7e6f523..bfb9ee6a7 100644 --- a/lib/Cake/Console/HelpFormatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -140,7 +140,7 @@ class HelpFormatter { foreach ($this->_parser->options() as $option) { $options[] = $option->usage(); } - if (count($options) > $this->_maxOptions){ + if (count($options) > $this->_maxOptions) { $options = array('[options]'); } $usage = array_merge($usage, $options); diff --git a/lib/Cake/Controller/CakeErrorController.php b/lib/Cake/Controller/CakeErrorController.php index fea081b61..51934c34e 100644 --- a/lib/Cake/Controller/CakeErrorController.php +++ b/lib/Cake/Controller/CakeErrorController.php @@ -55,7 +55,7 @@ class CakeErrorController extends AppController { public function beforeRender() { parent::beforeRender(); foreach ($this->viewVars as $key => $value) { - if (!is_object($value)){ + if (!is_object($value)) { $this->viewVars[$key] = h($value); } } diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index ccd49b34d..893ee037d 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -567,7 +567,7 @@ class Mysql extends DboSource { protected function _alterIndexes($table, $indexes) { $alter = array(); if (isset($indexes['drop'])) { - foreach($indexes['drop'] as $name => $value) { + foreach ($indexes['drop'] as $name => $value) { $out = 'DROP '; if ($name == 'PRIMARY') { $out .= 'PRIMARY KEY'; diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index 2be926d24..9217d498c 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -409,7 +409,7 @@ class Postgres extends DboSource { if (!$constant && strpos($match[1], '.') === false) { $match[1] = $this->name($match[1]); - } elseif (!$constant){ + } elseif (!$constant) { $parts = explode('.', $match[1]); if (!Set::numeric($parts)) { $match[1] = $this->name($match[1]); @@ -550,7 +550,7 @@ class Postgres extends DboSource { protected function _alterIndexes($table, $indexes) { $alter = array(); if (isset($indexes['drop'])) { - foreach($indexes['drop'] as $name => $value) { + foreach ($indexes['drop'] as $name => $value) { $out = 'DROP '; if ($name == 'PRIMARY') { continue; diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index 2d441d7a6..6a4cdec6e 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -286,9 +286,9 @@ class Sqlite extends DboSource { } } elseif (strpos($querystring, 'PRAGMA table_info') === 0) { $selects = array('cid', 'name', 'type', 'notnull', 'dflt_value', 'pk'); - } elseif(strpos($querystring, 'PRAGMA index_list') === 0) { + } elseif (strpos($querystring, 'PRAGMA index_list') === 0) { $selects = array('seq', 'name', 'unique'); - } elseif(strpos($querystring, 'PRAGMA index_info') === 0) { + } elseif (strpos($querystring, 'PRAGMA index_info') === 0) { $selects = array('seqno', 'cid', 'name'); } while ($j < $num_fields) { diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 7d777d44e..55b242cc3 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -1947,7 +1947,7 @@ class DboSource extends DataSource { if (!isset($params[1])) { $params[1] = 'count'; } - if (is_object($model) && $model->isVirtualField($params[0])){ + if (is_object($model) && $model->isVirtualField($params[0])) { $arg = $this->_quoteFields($model->getVirtualField($params[0])); } else { $arg = $this->name($params[0]); @@ -2191,7 +2191,7 @@ class DboSource extends DataSource { } if (is_object($fields[$i]) && isset($fields[$i]->type) && $fields[$i]->type === 'expression') { $fields[$i] = $fields[$i]->value; - } elseif (preg_match('/^\(.*\)\s' . $this->alias . '.*/i', $fields[$i])){ + } elseif (preg_match('/^\(.*\)\s' . $this->alias . '.*/i', $fields[$i])) { continue; } elseif (!preg_match('/^.+\\(.*\\)/', $fields[$i])) { $prepend = ''; @@ -2622,7 +2622,7 @@ class DboSource extends DataSource { if (!is_array($group)) { $group = array($group); } - foreach($group as $index => $key) { + foreach ($group as $index => $key) { if (is_object($model) && $model->isVirtualField($key)) { $group[$index] = '(' . $model->getVirtualField($key) . ')'; } diff --git a/lib/Cake/Model/Datasource/Session/DatabaseSession.php b/lib/Cake/Model/Datasource/Session/DatabaseSession.php index 716fa581c..cb43d6552 100644 --- a/lib/Cake/Model/Datasource/Session/DatabaseSession.php +++ b/lib/Cake/Model/Datasource/Session/DatabaseSession.php @@ -47,13 +47,13 @@ class DatabaseSession implements CakeSessionHandlerInterface { if (empty($modelName)) { $settings = array( - 'class' =>'Session', + 'class' => 'Session', 'alias' => 'Session', 'table' => 'cake_sessions', ); } else { $settings = array( - 'class' =>$modelName, + 'class' => $modelName, 'alias' => 'Session', ); } diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 3442a54bb..9149d6e0d 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -2136,7 +2136,7 @@ class Model extends Object { if (in_array($associations[$association], array('belongsTo', 'hasOne'))) { $validates = $this->{$association}->create($values) && $this->{$association}->validates($options); $return[$association][] = $validates; - } elseif($associations[$association] === 'hasMany') { + } elseif ($associations[$association] === 'hasMany') { $validates = $this->{$association}->validateMany($values, $options); $return[$association] = $validates; } diff --git a/lib/Cake/Routing/Route/CakeRoute.php b/lib/Cake/Routing/Route/CakeRoute.php index 78b787fe1..18c1a8f38 100644 --- a/lib/Cake/Routing/Route/CakeRoute.php +++ b/lib/Cake/Routing/Route/CakeRoute.php @@ -229,7 +229,7 @@ class CakeRoute { // restructure 'pass' key route params if (isset($this->options['pass'])) { $j = count($this->options['pass']); - while($j--) { + while ($j--) { if (isset($route[$this->options['pass'][$j]])) { array_unshift($route['pass'], $route[$this->options['pass'][$j]]); } diff --git a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php index 15686b3a9..db3dc9faf 100644 --- a/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php @@ -102,7 +102,7 @@ class MemcacheEngineTest extends CakeTestCase { $available = true; $Memcache = new Memcache(); - foreach($servers as $server) { + foreach ($servers as $server) { list($host, $port) = explode(':', $server); if (!@$Memcache->connect($host, $port)) { $available = false; diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php index 8f7fab36b..25226bb26 100644 --- a/lib/Cake/Test/Case/I18n/I18nTest.php +++ b/lib/Cake/Test/Case/I18n/I18nTest.php @@ -2603,7 +2603,7 @@ class I18nTest extends CakeTestCase { $this->assertEquals($expected, $result); } - public function testTimeDefinitionJapanese(){ + public function testTimeDefinitionJapanese() { Configure::write('Config.language', 'ja_jp'); $result = __c('d_fmt', 5); diff --git a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php index 87e87df1e..ba7bc4fb6 100644 --- a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php @@ -2921,8 +2921,8 @@ class ContainableBehaviorTest extends CakeTestCase { 'order' => array('Article.id' => 'ASC') )); if (!empty($result)) { - foreach($result as $i=>$article) { - foreach($article['Comment'] as $j=>$comment) { + foreach ($result as $i => $article) { + foreach ($article['Comment'] as $j => $comment) { $result[$i]['Comment'][$j] = array_diff_key($comment, array('id'=>true)); } } @@ -3628,7 +3628,7 @@ class ContainableBehaviorTest extends CakeTestCase { return $this->__containments($result['models']); } else { $result = $Model; - foreach($result as $i => $containment) { + foreach ($result as $i => $containment) { $result[$i] = array_diff_key($containment, array('instance' => true)); } } @@ -3646,7 +3646,7 @@ class ContainableBehaviorTest extends CakeTestCase { function __assertBindings(&$Model, $expected = array()) { $expected = array_merge(array('belongsTo' => array(), 'hasOne' => array(), 'hasMany' => array(), 'hasAndBelongsToMany' => array()), $expected); - foreach($expected as $binding => $expect) { + foreach ($expected as $binding => $expect) { $this->assertEquals(array_keys($Model->$binding), $expect); } } @@ -3664,14 +3664,14 @@ class ContainableBehaviorTest extends CakeTestCase { $debug = '['; $lines = array(); - foreach($relationTypes as $binding) { + foreach ($relationTypes as $binding) { if (!empty($Model->$binding)) { $models = array_keys($Model->$binding); - foreach($models as $linkedModel) { + foreach ($models as $linkedModel) { $line = $linkedModel; if (!empty($extra) && !empty($Model->{$binding}[$linkedModel])) { $extraData = array(); - foreach(array_intersect_key($Model->{$binding}[$linkedModel], array_flip($extra)) as $key => $value) { + foreach (array_intersect_key($Model->{$binding}[$linkedModel], array_flip($extra)) as $key => $value) { $extraData[] = $key . ': ' . (is_array($value) ? '(' . implode(', ', $value) . ')' : $value); } $line .= ' {' . implode(' - ', $extraData) . '}'; diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index d45b91085..2917133de 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -131,7 +131,7 @@ class ModelReadTest extends BaseModelTest { 'fields' => array('Thread.project_id', 'COUNT(*) AS total') )); $result = array(); - foreach($rows as $row) { + foreach ($rows as $row) { $result[$row['Thread']['project_id']] = $row[0]['total']; } $expected = array( @@ -146,7 +146,7 @@ class ModelReadTest extends BaseModelTest { 'order'=> 'Thread.project_id' )); $result = array(); - foreach($rows as $row) { + foreach ($rows as $row) { $result[$row['Thread']['project_id']] = $row[0]['total']; } $expected = array( diff --git a/lib/Cake/Test/Case/Model/models.php b/lib/Cake/Test/Case/Model/models.php index d747196a3..157495c23 100644 --- a/lib/Cake/Test/Case/Model/models.php +++ b/lib/Cake/Test/Case/Model/models.php @@ -899,7 +899,7 @@ class ModifiedAuthor extends Author { * @return void */ public function afterFind($results, $primary = false) { - foreach($results as $index => $result) { + foreach ($results as $index => $result) { $results[$index]['Author']['user'] .= ' (CakePHP)'; } return $results; diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index b131b8ed0..6aae62c94 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -20,7 +20,7 @@ App::uses('Dispatcher', 'Routing'); if (!class_exists('AppController', false)) { require_once CAKE . 'Controller' . DS . 'AppController.php'; -} elseif (!defined('APP_CONTROLLER_EXISTS')){ +} elseif (!defined('APP_CONTROLLER_EXISTS')) { define('APP_CONTROLLER_EXISTS', true); } diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php index 9e186aa96..2ac0af3bb 100644 --- a/lib/Cake/Test/Case/Utility/SetTest.php +++ b/lib/Cake/Test/Case/Utility/SetTest.php @@ -2403,7 +2403,7 @@ class SetTest extends CakeTestCase { $mapped = Set::map($expected); $ids = array(); - foreach($mapped as $object) { + foreach ($mapped as $object) { $ids[] = $object->id; } $this->assertEquals($ids, array(1, 2)); @@ -2451,7 +2451,7 @@ class SetTest extends CakeTestCase { $ids = array(); - foreach($mapped as $object) { + foreach ($mapped as $object) { $ids[] = $object->id; } $this->assertEquals($ids, array(1, 2)); diff --git a/lib/Cake/Test/Case/Utility/StringTest.php b/lib/Cake/Test/Case/Utility/StringTest.php index a3c07a57c..f7cdc6d25 100644 --- a/lib/Cake/Test/Case/Utility/StringTest.php +++ b/lib/Cake/Test/Case/Utility/StringTest.php @@ -47,7 +47,7 @@ class StringTest extends CakeTestCase { $count = mt_rand(10, 1000); $pattern = "/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/"; - for($i = 0; $i < $count; $i++) { + for ($i = 0; $i < $count; $i++) { $result = String::uuid(); $match = (bool) preg_match($pattern, $result); $this->assertTrue($match); diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index 05244616a..5c834d956 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -868,7 +868,7 @@ class XmlTest extends CakeTestCase { //multiple model results - without a records key it would fatal error $data = $user->find('all', array('limit'=>2)); - $data = array('records'=>$data); + $data = array('records' => $data); $obj = Xml::build(compact('data')); $expected = '<' . '?xml version="1.0" encoding="UTF-8"?>'; $expected .= ''; diff --git a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php index 40e742e0f..fadc41ec8 100644 --- a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php @@ -279,7 +279,7 @@ class PaginatorHelperTest extends CakeTestCase { * * @return void */ - public function testSortLinksUsingDirectionOption(){ + public function testSortLinksUsingDirectionOption() { Router::reload(); Router::parse('/'); Router::setRequestInfo(array( diff --git a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php index fd337b1bf..1a53c336b 100644 --- a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php @@ -116,7 +116,7 @@ class TimeHelperTest extends CakeTestCase { $result = $this->Time->timeAgoInWords(strtotime('+1 month +1 week +6 days'), array('end' => '8 years'), true); $this->assertEquals($result, '1 month, 1 week, 6 days'); - for($i = 0; $i < 200; $i ++) { + for ($i = 0; $i < 200; $i ++) { $years = mt_rand(0, 3); $months = mt_rand(0, 11); $weeks = mt_rand(0, 3); @@ -411,7 +411,7 @@ class TimeHelperTest extends CakeTestCase { if (!$this->skipIf(!class_exists('DateTimeZone'), '%s DateTimeZone class not available.')) { $timezones = array('Europe/London', 'Europe/Brussels', 'UTC', 'America/Denver', 'America/Caracas', 'Asia/Kathmandu'); - foreach($timezones as $timezone) { + foreach ($timezones as $timezone) { $yourTimezone = new DateTimeZone($timezone); $yourTime = new DateTime('now', $yourTimezone); $userOffset = $yourTimezone->getOffset($yourTime) / HOUR; diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 029486b2a..12baeccb0 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -228,7 +228,7 @@ class CakeTestSuiteDispatcher { function _runTestCase() { $commandArgs = array( 'case' => $this->params['case'], - 'core' =>$this->params['core'], + 'core' => $this->params['core'], 'app' => $this->params['app'], 'plugin' => $this->params['plugin'], 'codeCoverage' => $this->params['codeCoverage'], diff --git a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php index 11fe4b236..cc13eb997 100644 --- a/lib/Cake/TestSuite/Fixture/CakeTestFixture.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestFixture.php @@ -144,7 +144,7 @@ class CakeTestFixture { if (empty($this->fields['tableParameters']['engine'])) { $canUseMemory = true; - foreach($this->fields as $field => $args) { + foreach ($this->fields as $field => $args) { if (is_string($args)) { $type = $args; @@ -205,7 +205,7 @@ class CakeTestFixture { $values = array(); if (isset($this->records) && !empty($this->records)) { $fields = array(); - foreach($this->records as $record) { + foreach ($this->records as $record) { $fields = array_merge($fields, array_keys(array_intersect_key($record, $this->fields))); } $fields = array_unique($fields); diff --git a/lib/Cake/TestSuite/Fixture/CakeTestModel.php b/lib/Cake/TestSuite/Fixture/CakeTestModel.php index e41d031cb..c9ad1ac6f 100644 --- a/lib/Cake/TestSuite/Fixture/CakeTestModel.php +++ b/lib/Cake/TestSuite/Fixture/CakeTestModel.php @@ -39,7 +39,7 @@ class CakeTestModel extends Model { public function beforeFind($queryData) { $pk = $this->primaryKey; $aliasedPk = $this->alias . '.' . $this->primaryKey; - switch(true) { + switch (true) { case !$pk: case !$this->useTable: case !$this->schema('id'): diff --git a/lib/Cake/TestSuite/templates/menu.php b/lib/Cake/TestSuite/templates/menu.php index cbe689db3..6a2f54980 100644 --- a/lib/Cake/TestSuite/templates/menu.php +++ b/lib/Cake/TestSuite/templates/menu.php @@ -30,7 +30,7 @@ if (!empty($plugins)): ?>
  • Plugins - +
    • diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 41efe2fdd..c05ae3322 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1208,7 +1208,7 @@ class FormHelper extends AppHelper { */ public function checkbox($fieldName, $options = array()) { $valueOptions = array(); - if(isset($options['default'])){ + if (isset($options['default'])) { $valueOptions['default'] = $options['default']; unset($options['default']); } diff --git a/lib/Cake/View/Helper/JqueryEngineHelper.php b/lib/Cake/View/Helper/JqueryEngineHelper.php index 21dcf629d..90f9e4792 100644 --- a/lib/Cake/View/Helper/JqueryEngineHelper.php +++ b/lib/Cake/View/Helper/JqueryEngineHelper.php @@ -247,7 +247,7 @@ class JqueryEngineHelper extends JsBaseEngineHelper { if (isset($options['update'])) { $wrapCallbacks = isset($options['wrapCallbacks']) ? $options['wrapCallbacks'] : true; $success = ''; - if(isset($options['success']) AND !empty($options['success'])) { + if (isset($options['success']) AND !empty($options['success'])) { $success .= $options['success']; } $success .= $this->jQueryObject . '("' . $options['update'] . '").html(data);'; diff --git a/lib/Cake/View/Helper/TimeHelper.php b/lib/Cake/View/Helper/TimeHelper.php index b9a8aed16..6c4bbb198 100644 --- a/lib/Cake/View/Helper/TimeHelper.php +++ b/lib/Cake/View/Helper/TimeHelper.php @@ -459,8 +459,8 @@ class TimeHelper extends AppHelper { public function toRSS($dateString, $userOffset = null) { $date = $this->fromString($dateString, $userOffset); - if(!is_null($userOffset)) { - if($userOffset == 0) { + if (!is_null($userOffset)) { + if ($userOffset == 0) { $timezone = '+0000'; } else { $hours = (int) floor(abs($userOffset)); diff --git a/lib/Cake/basics.php b/lib/Cake/basics.php index d57529241..9f11f3397 100644 --- a/lib/Cake/basics.php +++ b/lib/Cake/basics.php @@ -1,5 +1,4 @@