Code Duplication    Length = 2-9 lines in 2 locations

src/wp-includes/class-wp-customize-setting.php 1 location

@@ 734-742 (lines=9) @@
731
			$node = &$node[ $key ];
732
		}
733
734
		if ( $create ) {
735
			if ( ! is_array( $node ) ) {
736
				// account for an array overriding a string or object value
737
				$node = array();
738
			}
739
			if ( ! isset( $node[ $last ] ) ) {
740
				$node[ $last ] = array();
741
			}
742
		}
743
744
		if ( ! isset( $node[ $last ] ) )
745
			return;

src/wp-includes/meta.php 1 location

@@ 835-836 (lines=2) @@
832
			$mval = $metarow['meta_value'];
833
834
			// Force subkeys to be array type:
835
			if ( !isset($cache[$mpid]) || !is_array($cache[$mpid]) )
836
				$cache[$mpid] = array();
837
			if ( !isset($cache[$mpid][$mkey]) || !is_array($cache[$mpid][$mkey]) )
838
				$cache[$mpid][$mkey] = array();
839