From 74dc815bfa0efc945970cdd515a9660cb42d974b Mon Sep 17 00:00:00 2001 From: Alexis Algoud Date: Sat, 10 Mar 2018 14:14:31 +0100 Subject: [PATCH] fix commonobject isInt for module builder capabilities --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d55e564d774..388dfe9799b 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5371,7 +5371,7 @@ abstract class CommonObject $label = $val['label']; $type = $val['type']; $size = $val['css']; - + // Convert var to be able to share same code than showOutputField of extrafields if (preg_match('/varchar\((\d+)\)/', $type, $reg)) { @@ -6047,7 +6047,7 @@ abstract class CommonObject { if(is_array($info)) { - if(isset($info['type']) && ($info['type']=='int' || $info['type']=='integer' )) return true; + if(isset($info['type']) && ($info['type']=='int' || preg_match('/^integer/i',$info['type']) ) ) return true; else return false; } else return false;