diff --git a/CHANGELOG.md b/CHANGELOG.md index e9e2a88..7333a30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # SEOmatic Changelog +## 1.1.48 - 2017.06.18 +### Changed +* Fixed an issue on old versions of PHP < PHP 5.4 with `http_response_code()` + ## 1.1.47 - 2017.06.08 ### Changed * Fixed an issue with Live Preview and a previous or draft version of an entry diff --git a/SeomaticPlugin.php b/SeomaticPlugin.php index 422e352..0e20b58 100755 --- a/SeomaticPlugin.php +++ b/SeomaticPlugin.php @@ -26,7 +26,7 @@ public function getReleaseFeedUrl() public function getVersion() { - return '1.1.47'; + return '1.1.48'; } public function getSchemaVersion() diff --git a/releases.json b/releases.json index 40b5f6b..71da0e4 100644 --- a/releases.json +++ b/releases.json @@ -1,4 +1,12 @@ [ + { + "version": "1.1.48", + "downloadUrl": "https://github.com/nystudio107/seomatic/archive/master.zip", + "date": "2017-06-18T11:00:00-11:00", + "notes": [ + "[Fixed] Fixed an issue on old versions of PHP < PHP 5.4 with `http_response_code()`" + ] + }, { "version": "1.1.47", "downloadUrl": "https://github.com/nystudio107/seomatic/archive/master.zip", diff --git a/services/SeomaticService.php b/services/SeomaticService.php index cf7d01a..453aa3d 100644 --- a/services/SeomaticService.php +++ b/services/SeomaticService.php @@ -1104,8 +1104,10 @@ public function getGlobals($forTemplate="", $locale) /* -- If this is a 404, set the canonicalUrl to nothing */ - if (http_response_code() == 404) { - $meta['canonicalUrl'] = ""; + if (function_exists('http_response_code')) { + if (http_response_code() == 404) { + $meta['canonicalUrl'] = ""; + } } /* -- Merge with the global override config settings */