mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°3065 - Failed enum comparison when values contains parenthesis : add a warning
This commit is contained in:
@@ -1268,6 +1268,7 @@ class CMDBSource
|
||||
return self::GetEnumOptions($sDataType, $sCompleteFieldType);
|
||||
}catch(CoreException $e){
|
||||
//do nothing ; especially do not block setup.
|
||||
IssueLog::Warning("enum was not parsed properly: $sCompleteFieldType. it should not happen during setup.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ class CMDBSourceTest extends ItopTestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
|
||||
parent::setUp();
|
||||
require_once(APPROOT.'/core/cmdbsource.class.inc.php');
|
||||
}
|
||||
@@ -112,6 +113,11 @@ class CMDBSourceTest extends ItopTestCase
|
||||
"ENUM('value 1 (with parenthesis)','value 2') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci",
|
||||
"enum('value 1 (with parenthesis)','value 3') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci",
|
||||
),
|
||||
'ENUM with different values, containing parenthesis' => array(
|
||||
false,
|
||||
"ENUM('value 1 ) with parenthesis)','value 2') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci",
|
||||
"enum('value 1 (with parenthesis)','value 3') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci",
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user