Skip to content

Commit

Permalink
Remove fallback for http_response_code()
Browse files Browse the repository at this point in the history
  • Loading branch information
raamdev committed Mar 2, 2016
1 parent 6d03dae commit 41a4b83
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions src/includes/traits/Ac/ObUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,6 @@ public function outputBufferCallbackHandler($buffer, $phase)
if (stripos($cache, '<body id="error-page">') !== false) {
return (boolean) $this->maybeSetDebugInfo($this::NC_DEBUG_WP_ERROR_PAGE);
}
if (!$this->functionIsPossible('http_response_code')) {
if (stripos($cache, '<title>database error</title>') !== false) {
return (boolean) $this->maybeSetDebugInfo($this::NC_DEBUG_WP_ERROR_PAGE);
}
}
if (!$this->hasACacheableContentType()) {
return (boolean) $this->maybeSetDebugInfo($this::NC_DEBUG_UNCACHEABLE_CONTENT_TYPE);
}
Expand Down
2 changes: 1 addition & 1 deletion src/includes/traits/Shared/HttpUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function httpStatus()

if ($has_property_is_404 && $this->is_404) {
$status = 404; // WordPress said so.
} elseif ($this->functionIsPossible('http_response_code') && ($code = (integer) http_response_code())) {
} elseif (($code = (integer) http_response_code())) {
$status = (integer) $code; // {@link \http_response_code()} available since PHP v5.4.
} elseif ($has_property_http_status && (integer) $this->http_status) {
$status = (integer) $this->http_status; // {@link \status_header()} filter.
Expand Down

0 comments on commit 41a4b83

Please sign in to comment.