Просмотр исходного кода

Ticket #4971 - Build-in API support: Minor fix in Forms.

AntonLV 10 месяцев назад
Родитель
Сommit
cb0e405191
1 измененных файлов с 6 добавлено и 3 удалено
  1. 6 3
      template/scripts/BxBaseFormView.php

+ 6 - 3
template/scripts/BxBaseFormView.php

@@ -403,9 +403,12 @@ class BxBaseFormView extends BxDolForm
             list($sIcon, $sIconUrl, $sIconA, $sIconHtml) = $oFunctions->getIcon($aInput['icon'] ?? '');
 
             $aInput['icon'] = $sIcon ? $oIconset->getIcon($sIcon) : ($sIconHtml ? $sIconHtml : '');
-            $aInput['info'] = strip_tags($aInput['info']);
-            $aInput['help'] = strip_tags($aInput['help']);
-            $aInput['error'] = strip_tags($aInput['error']);
+            if(!empty($aInput['info']))
+                $aInput['info'] = strip_tags($aInput['info']);
+            if(!empty($aInput['help']))
+                $aInput['help'] = strip_tags($aInput['help']);
+            if(!empty($aInput['error']))
+                $aInput['error'] = strip_tags($aInput['error']);
 
             if (isset($aInput['type']) && 'files' == $aInput['type']){
                 $oStorage = BxDolStorage::getObjectInstance($aInput['storage_object']);