Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

converting if ($foo != "") to if ($foo)

  • Loading branch information...
commit 36314e6d37cf954e207d183f15705aecd85e55fe 1 parent 8dc4de5
Carl Sutton dogmatic69 authored
2  lib/Cake/Model/Datasource/CakeSession.php
View
@@ -663,7 +663,7 @@ protected static function _checkValid() {
*/
public static function renew() {
if (session_id()) {
- if (session_id() != '' || isset($_COOKIE[session_name()])) {
+ if (session_id() || isset($_COOKIE[session_name()])) {
setcookie(Configure::read('Session.cookie'), '', time() - 42000, self::$path);
}
session_regenerate_id(true);
2  lib/Cake/View/Helper.php
View
@@ -749,7 +749,7 @@ protected function _initInputField($field, $options = array()) {
* @return array Array of options with $key set.
*/
public function addClass($options = array(), $class = null, $key = 'class') {
- if (isset($options[$key]) && trim($options[$key]) != '') {
+ if (isset($options[$key]) && trim($options[$key])) {
$options[$key] .= ' ' . $class;
} else {
$options[$key] = $class;
2  lib/Cake/View/Helper/CacheHelper.php
View
@@ -148,7 +148,7 @@ public function cache($file, $out) {
$cacheTime = $cacheAction;
}
- if ($cacheTime != '' && $cacheTime > 0) {
+ if ($cacheTime && $cacheTime > 0) {
$cached = $this->_parseOutput($out);
try {
$this->_writeFile($cached, $cacheTime, $useCallbacks);
Please sign in to comment.
Something went wrong with that request. Please try again.