mscherer 3 年 前
コミット
32d8838d70
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/Utility/FrozenTime.php

+ 1 - 1
src/Utility/FrozenTime.php

@@ -103,7 +103,7 @@ class FrozenTime extends CakeFrozenTime {
 	 * @return int Age (0 if both timestamps are equal or empty, -1 on invalid dates)
 	 */
 	public static function age($start, $end = null) {
-		if (!$start && $end || $start == $end) {
+		if (!$start && !$end || $start == $end) {
 			return 0;
 		}