Browse Source

Portal: service type mapping can be an empty string

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2963 a333f486-631f-4898-b8df-5754b55c2be0
romainq 11 năm trước cách đây
mục cha
commit
6f10878415
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      portal/index.php

+ 1 - 1
portal/index.php

@@ -100,7 +100,7 @@ function ComputeClass($iSubSvcId)
  */
 function RestrictSubcategories(&$oSearch)
 {
-	$aMapping = json_decode(PORTAL_TYPE_TO_CLASS, true);
+	$aMapping = (PORTAL_TYPE_TO_CLASS == '') ? array() : json_decode(PORTAL_TYPE_TO_CLASS, true);
 	foreach($aMapping as $sTicketType => $sClass)
 	{
 		if (!in_array($sClass, GetTicketClasses()))