mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
converting if ($foo != "") to if ($foo)
This commit is contained in:
parent
8dc4de5de8
commit
36314e6d37
3 changed files with 3 additions and 3 deletions
|
@ -663,7 +663,7 @@ class CakeSession {
|
|||
*/
|
||||
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);
|
||||
|
|
|
@ -749,7 +749,7 @@ class Helper extends Object {
|
|||
* @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;
|
||||
|
|
|
@ -148,7 +148,7 @@ class CacheHelper extends AppHelper {
|
|||
$cacheTime = $cacheAction;
|
||||
}
|
||||
|
||||
if ($cacheTime != '' && $cacheTime > 0) {
|
||||
if ($cacheTime && $cacheTime > 0) {
|
||||
$cached = $this->_parseOutput($out);
|
||||
try {
|
||||
$this->_writeFile($cached, $cacheTime, $useCallbacks);
|
||||
|
|
Loading…
Reference in a new issue