This repository was archived by the owner on Feb 7, 2023. It is now read-only.
File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,7 @@ protected function gatherPatternInfo() {
685
685
686
686
/*************************************
687
687
* This section is for:
688
- * JSON psuedo -patterns
688
+ * JSON pseudo -patterns
689
689
*************************************/
690
690
691
691
$ patternSubtypeInclude = ($ patternSubtypeSet ) ? $ patternSubtype ."- " : "" ;
@@ -759,7 +759,7 @@ protected function gatherPatternInfo() {
759
759
}
760
760
761
761
// get the special pattern data
762
- $ patternData = (array ) json_decode (file_get_contents ($ object ->getPathname ()));
762
+ $ patternData = (array ) json_decode (file_get_contents ($ object ->getPathname ()), true );
763
763
$ this ->jsonLastErrorMsg ($ object ->getFilename ());
764
764
765
765
// merge them for the file
@@ -768,11 +768,9 @@ protected function gatherPatternInfo() {
768
768
$ this ->d ["patternSpecific " ][$ patternPartial ]["data " ] = array ();
769
769
$ this ->d ["patternSpecific " ][$ patternPartial ]["listItems " ] = array ();
770
770
}
771
-
772
771
if (is_array ($ patternDataBase ) && is_array ($ patternData )) {
773
- $ this ->d ["patternSpecific " ][$ patternPartial ]["data " ] = array_merge ($ patternDataBase , $ patternData );
772
+ $ this ->d ["patternSpecific " ][$ patternPartial ]["data " ] = array_replace_recursive ($ patternDataBase , $ patternData );
774
773
}
775
-
776
774
}
777
775
778
776
} else if ($ object ->isFile () && ($ object ->getExtension () == "json " )) {
You can’t perform that action at this time.
0 commit comments