diff --git a/CHANGELOG.md b/CHANGELOG.md index bd3a997a1..0e3702027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# v0.9.37 +## 08/12/2015 + +3. [](#bugfix) + * Fixed issue when saving `header.process` in page forms via the **admin plugin** + * Fixed error due to use of `set_time_limit` that might be disabled on some hosts + # v0.9.36 ## 08/11/2015 diff --git a/system/defines.php b/system/defines.php index 84c41d5f6..d6803db21 100644 --- a/system/defines.php +++ b/system/defines.php @@ -2,7 +2,7 @@ // Some standard defines define('GRAV', true); -define('GRAV_VERSION', '0.9.36'); +define('GRAV_VERSION', '0.9.37'); define('DS', '/'); // Directories and Paths diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 4263a5731..3c8a8dbb7 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -232,10 +232,10 @@ class Page $this->menu = trim($this->header->menu); } if (isset($this->header->routable)) { - $this->routable = $this->header->routable; + $this->routable = (bool) $this->header->routable; } if (isset($this->header->visible)) { - $this->visible = $this->header->visible; + $this->visible = (bool) $this->header->visible; } if (isset($this->header->order_dir)) { $this->order_dir = trim($this->header->order_dir); @@ -253,7 +253,7 @@ class Page $this->markdown_extra = (bool)$this->header->markdown_extra; } if (isset($this->header->taxonomy)) { - foreach ($this->header->taxonomy as $taxonomy => $taxitems) { + foreach ((array) $this->header->taxonomy as $taxonomy => $taxitems) { $this->taxonomy[$taxonomy] = (array)$taxitems; } } @@ -261,12 +261,12 @@ class Page $this->max_count = intval($this->header->max_count); } if (isset($this->header->process)) { - foreach ($this->header->process as $process => $status) { - $this->process[$process] = $status; + foreach ((array) $this->header->process as $process => $status) { + $this->process[$process] = (bool) $status; } } if (isset($this->header->published)) { - $this->published = $this->header->published; + $this->published = (bool) $this->header->published; } if (isset($this->header->publish_date)) { $this->publish_date = strtotime($this->header->publish_date); @@ -278,10 +278,10 @@ class Page $this->expires = intval($this->header->expires); } if (isset($this->header->etag)) { - $this->etag = (bool)$this->header->etag; + $this->etag = (bool) $this->header->etag; } if (isset($this->header->last_modified)) { - $this->last_modified = (bool)$this->header->last_modified; + $this->last_modified = (bool) $this->header->last_modified; } } diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index 5c38f97a9..2cd81ada6 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -219,7 +219,11 @@ abstract class Utils $file_parts = pathinfo($file); $filesize = filesize($file); - set_time_limit(0); + // check if this function is available, if so use it to stop any timeouts + if (function_exists('set_time_limit')) { + set_time_limit(0); + } + ignore_user_abort(false); if ($force_download) {