Explorar o código

Issue #155 : correction fonction _nbNotRead

intval renvoyant toujours un integer, le test is_int() passait toujours,
c'est corrigé maintenant
Marien Fressinaud %!s(int64=12) %!d(string=hai) anos
pai
achega
e19695e14b
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      app/models/Feed.php

+ 4 - 3
app/models/Feed.php

@@ -167,11 +167,12 @@ class Feed extends Model {
 		}
 		$this->keep_history = $value;
 	}
-	public function _nbNotRead ($value) {	//Alex
-		if (!is_int (intval ($value))) {
+	public function _nbNotRead ($value) {
+		if (!is_int ($value)) {
 			$value = -1;
 		}
-		$this->nbNotRead = $value;
+
+		$this->nbNotRead = intval ($value);
 	}
 
 	public function load () {