Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
* Fixed an issue on old versions of PHP < PHP 5.4 with `http_response…
Browse files Browse the repository at this point in the history
…_code()`
  • Loading branch information
Andrew Welch committed Jun 9, 2017
1 parent 84ca4e1 commit 104d857
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion SeomaticPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getReleaseFeedUrl()

public function getVersion()
{
return '1.1.47';
return '1.1.48';
}

public function getSchemaVersion()
Expand Down
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 4 additions & 2 deletions services/SeomaticService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 104d857

Please sign in to comment.