N°3049 Fix notice when having an ENUM field with values containing parenthesis

This commit is contained in:
Pierre Goiffon
2020-05-27 17:20:48 +02:00
parent 336637a7a4
commit e6a8f492d5
2 changed files with 7 additions and 2 deletions

View File

@@ -1248,9 +1248,9 @@ class CMDBSource
*/
private static function GetFieldDataTypeAndOptions($sCompleteFieldType)
{
preg_match('/^([a-zA-Z]+)(\(([^\)]+)\))?( .+)?$/', $sCompleteFieldType, $aMatches);
preg_match('/^([a-zA-Z]+)(\(([^\)]+)\))?( .+)?/', $sCompleteFieldType, $aMatches);
$sDataType = $aMatches[1];
$sDataType = isset($aMatches[1]) ? $aMatches[1] : '';
$sTypeOptions = isset($aMatches[2]) ? $aMatches[3] : '';
$sOtherOptions = isset($aMatches[4]) ? $aMatches[4] : '';