diff options
| author | 2013-12-26 02:50:58 +0100 | |
|---|---|---|
| committer | 2013-12-26 02:50:58 +0100 | |
| commit | 2788aaeb1a463012cfa90bf31f5efb4bf6ca7344 (patch) | |
| tree | 990d4b1ccd91cf59a9ec8bab4a15c356c4d1a55d /app/Models/Entry.php | |
| parent | 6d13bdac0c03598f34fa3cf8298b6510c41b345e (diff) | |
Problème ctype_digit qui ne marche pas sur des variables qui sont déjà des entiers
Diffstat (limited to 'app/Models/Entry.php')
| -rw-r--r-- | app/Models/Entry.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/Models/Entry.php b/app/Models/Entry.php index ed31ef2b1..ab9605eb1 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -106,11 +106,8 @@ class FreshRSS_Entry extends Minz_Model { $this->link = $value; } public function _date ($value) { - if (ctype_digit ($value)) { - $this->date = intval ($value); - } else { - $this->date = time (); - } + $value = intval($value); + $this->date = $value > 1 ? $value : time(); } public function _isRead ($value) { $this->is_read = $value; |
