Skip to content

Commit

Permalink
Template data are encoded to JSON forcedly as object to prevent unint…
Browse files Browse the repository at this point in the history
…ended array resorting
  • Loading branch information
jbogdani committed Feb 28, 2023
1 parent 4df2577 commit 785f6fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/tmpldata/tmpldata.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function save()
mkdir(dirname($this->data_file), 0755, true);
}

if (!utils::write_in_file($this->data_file, $this->post['data'], 'json')) {
if (!utils::write_in_file( json_encode($this->data_file, $this->post['data'], JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT|JSON_FORCE_OBJECT) )) {
throw new Exception();
}
}
Expand Down
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
5.9.1[] = "Template data are encoded to JSON forcedly as object to prevent unintended array resorting"
5.9.0[] = "sites/default links in database are automatically prefixed with html.link2('home')"
5.8.1[] = "Fixed bug with outHtml::searchForm outputting double slash"
5.8.0[] = "Added support for the advanced query"
Expand Down

0 comments on commit 785f6fb

Please sign in to comment.