@@ -565,7 +565,9 @@ public static function set_sections( string $opt_name = '', array $sections = ar
565565 Redux_Functions_Ex::record_caller ( $ opt_name );
566566
567567 foreach ( $ sections as $ section ) {
568- self ::set_section ( $ opt_name , $ section );
568+ if ( isset ( $ section ) && ! empty ( $ section ) ) {
569+ self ::set_section ( $ opt_name , $ section );
570+ }
569571 }
570572 }
571573
@@ -658,12 +660,12 @@ public static function remove_section( string $opt_name = '', string $id = '', b
658660 /**
659661 * Deprecated Sets a single option panel section.
660662 *
661- * @param string $opt_name Panel opt_name.
662- * @param array $section Section data.
663+ * @param string $opt_name Panel opt_name.
664+ * @param array|null $section Section data.
663665 *
664666 * @deprecated No longer using camelCase naming convention.
665667 */
666- public static function setSection ( string $ opt_name = '' , array $ section = array () ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
668+ public static function setSection ( string $ opt_name = '' , ? array $ section = array () ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName
667669 if ( '' !== $ opt_name ) {
668670 Redux_Functions_Ex::record_caller ( $ opt_name );
669671 }
@@ -674,11 +676,11 @@ public static function setSection( string $opt_name = '', array $section = array
674676 /**
675677 * Sets a single option panel section.
676678 *
677- * @param string $opt_name Panel opt_name.
678- * @param array $section Section data.
679- * @param bool $replace Replaces section instead of creating a new one.
679+ * @param string $opt_name Panel opt_name.
680+ * @param array|null $section Section data.
681+ * @param bool $replace Replaces section instead of creating a new one.
680682 */
681- public static function set_section ( string $ opt_name = '' , array $ section = array (), bool $ replace = false ) {
683+ public static function set_section ( string $ opt_name = '' , ? array $ section = array (), bool $ replace = false ) {
682684 if ( empty ( $ section ) || '' === $ opt_name ) {
683685 return ;
684686 }
0 commit comments