This repository was archived by the owner on Feb 7, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,7 @@ protected function gatherPatternInfo() {
685685
686686 /*************************************
687687 * This section is for:
688- * JSON psuedo -patterns
688+ * JSON pseudo -patterns
689689 *************************************/
690690
691691 $ patternSubtypeInclude = ($ patternSubtypeSet ) ? $ patternSubtype ."- " : "" ;
@@ -759,7 +759,7 @@ protected function gatherPatternInfo() {
759759 }
760760
761761 // 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 );
763763 $ this ->jsonLastErrorMsg ($ object ->getFilename ());
764764
765765 // merge them for the file
@@ -768,11 +768,9 @@ protected function gatherPatternInfo() {
768768 $ this ->d ["patternSpecific " ][$ patternPartial ]["data " ] = array ();
769769 $ this ->d ["patternSpecific " ][$ patternPartial ]["listItems " ] = array ();
770770 }
771-
772771 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 );
774773 }
775-
776774 }
777775
778776 } else if ($ object ->isFile () && ($ object ->getExtension () == "json " )) {
You can’t perform that action at this time.
0 commit comments