aboutsummaryrefslogtreecommitdiff
path: root/app/models/RSSConfiguration.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/RSSConfiguration.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/RSSConfiguration.php')
-rwxr-xr-xapp/models/RSSConfiguration.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/RSSConfiguration.php b/app/models/RSSConfiguration.php
index 007c1c0f5..5458ba2f3 100755
--- a/app/models/RSSConfiguration.php
+++ b/app/models/RSSConfiguration.php
@@ -171,7 +171,7 @@ class RSSConfiguration extends Model {
$this->language = $value;
}
public function _postsPerPage ($value) {
- if (is_int (intval ($value)) && $value > 0) {
+ if (ctype_digit ($value) && $value > 0) {
$this->posts_per_page = $value;
} else {
$this->posts_per_page = 10;
@@ -216,7 +216,7 @@ class RSSConfiguration extends Model {
$this->sort_order = $value === 'ASC' ? 'ASC' : 'DESC';
}
public function _oldEntries ($value) {
- if (is_int (intval ($value)) && $value > 0) {
+ if (ctype_digit ($value) && $value > 0) {
$this->old_entries = $value;
} else {
$this->old_entries = 3;