Code Duplication    Length = 2-9 lines in 2 locations

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

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

@@ 875-883 (lines=9) @@
872
			$node = &$node[ $key ];
873
		}
874
875
		if ( $create ) {
876
			if ( ! is_array( $node ) ) {
877
				// account for an array overriding a string or object value
878
				$node = array();
879
			}
880
			if ( ! isset( $node[ $last ] ) ) {
881
				$node[ $last ] = array();
882
			}
883
		}
884
885
		if ( ! isset( $node[ $last ] ) )
886
			return;