aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Feed.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-26 02:50:58 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-26 02:50:58 +0100
commit2788aaeb1a463012cfa90bf31f5efb4bf6ca7344 (patch)
tree990d4b1ccd91cf59a9ec8bab4a15c356c4d1a55d /app/Models/Feed.php
parent6d13bdac0c03598f34fa3cf8298b6510c41b345e (diff)
Problème ctype_digit qui ne marche pas sur des variables qui sont déjà des entiers
Diffstat (limited to 'app/Models/Feed.php')
-rw-r--r--app/Models/Feed.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index dcf97d4ec..3008e33d7 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -154,7 +154,8 @@ class FreshRSS_Feed extends Minz_Model {
$this->lastUpdate = $value;
}
public function _priority ($value) {
- $this->priority = ctype_digit ($value) ? intval ($value) : 10;
+ $value = intval($value);
+ $this->priority = $value >= 0 ? $value : 10;
}
public function _pathEntries ($value) {
$this->pathEntries = $value;
@@ -172,10 +173,10 @@ class FreshRSS_Feed extends Minz_Model {
$this->keep_history = $value;
}
public function _nbNotRead ($value) {
- $this->nbNotRead = ctype_digit ($value) ? intval ($value) : -1;
+ $this->nbNotRead = intval($value);
}
public function _nbEntries ($value) {
- $this->nbEntries = ctype_digit ($value) ? intval ($value) : -1;
+ $this->nbEntries = intval($value);
}
public function load () {