From f49c896e4f054afddb065705cc004a386b158212 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Sun, 10 Jun 2018 15:24:52 -0400 Subject: [PATCH] Restore ctype_digit --- application/models/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Item.php b/application/models/Item.php index 5a085aecc..7b911b7dd 100644 --- a/application/models/Item.php +++ b/application/models/Item.php @@ -66,7 +66,7 @@ class Item extends CI_Model $this->db->where('item_number', (string) $item_number); // check if $item_id is a number and not a string starting with 0 // because cases like 00012345 will be seen as a number where it is a barcode - if(is_numeric($item_id) && substr($item_id, 0, 1) != '0') + if(ctype_digit($item_id) && substr($item_id, 0, 1) != '0') { $this->db->where('item_id !=', (int) $item_id); }