|
@@ -102,8 +102,10 @@ trait traitDatabase
|
|
|
}
|
|
|
if (in_array($row['DATA_TYPE'], array('bigint', 'int', 'smallint', 'tinyint', 'integer'))) {
|
|
|
preg_match('/[\d]{1,}/', $row['COLUMN_TYPE'], $matches);
|
|
|
- $data['rules']['int'][$row['COLUMN_NAME']] = $matches[0];
|
|
|
- $data['rules']['number'][] = $row['COLUMN_NAME'];
|
|
|
+ if(!empty($matches)) {
|
|
|
+ $data['rules']['int'][$row['COLUMN_NAME']] = $matches[0];
|
|
|
+ $data['rules']['number'][] = $row['COLUMN_NAME'];
|
|
|
+ }
|
|
|
}
|
|
|
if (in_array($row['DATA_TYPE'], array('float', 'double', 'decimal'))) {
|
|
|
$data['rules']['float'][$row['COLUMN_NAME']] = $this->getValueFromBrackets($row['COLUMN_TYPE']);
|