AntonLV 9 лет назад
Родитель
Сommit
d8af7e7e85

+ 5 - 0
studio/classes/BxDolStudioUtils.php

@@ -197,6 +197,11 @@ class BxDolStudioUtils extends BxDol
 
     public static function getVisibilityValues($iValue, &$aValuesAll, &$aValuesSelected)
     {
+        if(!is_array($aValuesAll))
+            $aValuesAll = array();
+        if(!is_array($aValuesSelected))
+            $aValuesSelected = array();
+
         $aLevels = BxDolAcl::getInstance()->getMemberships(false, true);
         foreach($aLevels as $iKey => $sValue) {
             if(((int)$iValue & pow(2, (int)$iKey - 1)) != 0)

+ 3 - 2
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -1103,7 +1103,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
                     'content' => MsgBox(_t('_adm_bp_err_page_visible_for_levels'))
                 )
             );
-        else
+        else {
         	bx_import('BxDolStudioUtils');
             $aInputs = array(
                 'visible_for' => array(
@@ -1129,7 +1129,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
                     'name' => 'visible_for_levels',
                     'caption' => _t('_adm_bp_txt_page_visible_for_levels'),
                     'info' => _t('_adm_bp_dsc_page_visible_for_levels'),
-                    'value' => '',
+                    'value' => array(),
                     'values' => array(),
                     'tr_attrs' => array(
                         'style' => $iVisibleForLevels == BX_DOL_INT_MAX ? 'display:none' : ''
@@ -1139,6 +1139,7 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
                     )
                 )
             );
+        }
 
         $aForm = array(
             'form_attrs' => array(