From 37bd5bb801f8769bcd18d40f3dd76192da2cb845 Mon Sep 17 00:00:00 2001 From: aterekhov Date: Sat, 16 Oct 2010 15:23:46 +0000 Subject: [PATCH] smart is_int() check #0 git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@154 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- model/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/Model.php b/model/Model.php index c57ea9b..53278c5 100644 --- a/model/Model.php +++ b/model/Model.php @@ -107,7 +107,7 @@ abstract class Model */ public function update($data, $where) { - if (is_int($where)) { + if (is_int($where) || $where === (string) (int) $where) { $where = $this->identify($this->key) . '=' . (int) $where; } return $this->db->update($this->table(), $data, $where);