Implode an array returned by sort order #1264

This commit is contained in:
Andy Miller
2017-01-20 15:17:28 -07:00
parent 5ecf240c26
commit 300f65c22e
2 changed files with 12 additions and 2 deletions

View File

@@ -1,8 +1,16 @@
# v1.1.15
## xx/xx/2017
1. [](#new)
* Added a new `Collection::merge()` method to allow merging of multiple collections [#1258](https://github.com/getgrav/grav/pull/1258)
1. [](#bugfix)
* Fixed an issue when page collection with header-based `sort.by` returns an array [#1264](https://github.com/getgrav/grav/issues/1264)
# v1.1.14
## 01/18/2017
1. [](#bugfix)
* Fixed `page.collection()` returning array and not Collection object when header variable did not exist
* Fixed `Page::collection()` returning array and not Collection object when header variable did not exist
* Revert `Content-Encoding: identity` fix, and let you set `cache: allow_webserver_gzip:` option to switch to `identity` [#548](https://github.com/getgrav/grav/issues/548)
# v1.1.13

View File

@@ -1079,7 +1079,9 @@ class Pages
case (is_string($header_query[0])):
$child_header = new Header((array)$child->header());
$header_value = $child_header->get($header_query[0]);
if ($header_value) {
if (is_array($header_value)) {
$list[$key] = implode(',',$header_value);
} elseif ($header_value) {
$list[$key] = $header_value;
} else {
$list[$key] = $header_default ?: $key;