浏览代码

flips strict comparison as per coding standards

http://book.cakephp.org/2.0/en/contributing/cakephp-coding-conventions.html#comparison
Andrew Lechowicz 12 年之前
父节点
当前提交
a9a052b93a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Model/Behavior/SoftDeleteBehavior.php

+ 1 - 1
Model/Behavior/SoftDeleteBehavior.php

@@ -96,7 +96,7 @@ class SoftDeleteBehavior extends ModelBehavior {
 			$fields = $this->_normalizeFields($model);
 
 			foreach ($fields as $flag => $date) {
-				if (true === $runtime || $flag === $runtime) {
+				if ($runtime === true || $flag === $runtime) {
 					if (!in_array($flag, $conditions) && !in_array($model->name . '.' . $flag, $conditions)) {
 						$query['conditions'][$model->alias . '.' . $flag] = false;
 					}