summaryrefslogtreecommitdiff
path: root/app/models/Feed.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-01 21:38:20 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-01 21:38:20 +0100
commitbaa8d21341d3f35a06815fd3f4ec536ef6ac2f3e (patch)
tree38a618a3cc9c06ef53ff4c8a13d87fd033de4126 /app/models/Feed.php
parentb646bd2f084483bc95b279be3175c77174fbeb89 (diff)
PHP ctype_digit
Utilisation d'une fonction plus appropriée pour tester si une chaîne représente un nombre entier Corrige un bug de date
Diffstat (limited to 'app/models/Feed.php')
-rw-r--r--app/models/Feed.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/Feed.php b/app/models/Feed.php
index 954d1d45c..f183b2aa7 100644
--- a/app/models/Feed.php
+++ b/app/models/Feed.php
@@ -150,7 +150,7 @@ class Feed extends Model {
$this->lastUpdate = $value;
}
public function _priority ($value) {
- $this->priority = is_numeric ($value) ? intval ($value) : 10;
+ $this->priority = ctype_digit ($value) ? intval ($value) : 10;
}
public function _pathEntries ($value) {
$this->pathEntries = $value;
@@ -175,10 +175,10 @@ class Feed extends Model {
$this->keep_history = $value;
}
public function _nbNotRead ($value) {
- $this->nbNotRead = is_numeric ($value) ? intval ($value) : -1;
+ $this->nbNotRead = ctype_digit ($value) ? intval ($value) : -1;
}
public function _nbEntries ($value) {
- $this->nbEntries = is_numeric ($value) ? intval ($value) : -1;
+ $this->nbEntries = ctype_digit ($value) ? intval ($value) : -1;
}
public function load () {