From baa8d21341d3f35a06815fd3f4ec536ef6ac2f3e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 1 Dec 2013 21:38:20 +0100 Subject: PHP ctype_digit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Utilisation d'une fonction plus appropriée pour tester si une chaîne représente un nombre entier Corrige un bug de date --- app/models/Entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/Entry.php') diff --git a/app/models/Entry.php b/app/models/Entry.php index ae8facf68..196823f67 100755 --- a/app/models/Entry.php +++ b/app/models/Entry.php @@ -106,7 +106,7 @@ class Entry extends Model { $this->link = $value; } public function _date ($value) { - if (is_int ($value)) { + if (ctype_digit ($value)) { $this->date = intval ($value); } else { $this->date = time (); -- cgit v1.2.3