From 41a4b836f3af3ecc2e7368b01e856e867b1b8c3d Mon Sep 17 00:00:00 2001 From: Raam Dev Date: Wed, 2 Mar 2016 10:54:27 -0500 Subject: [PATCH] Remove fallback for http_response_code() See websharks/comet-cache#635 --- src/includes/traits/Ac/ObUtils.php | 5 ----- src/includes/traits/Shared/HttpUtils.php | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/includes/traits/Ac/ObUtils.php b/src/includes/traits/Ac/ObUtils.php index d77426b1..0adcef06 100644 --- a/src/includes/traits/Ac/ObUtils.php +++ b/src/includes/traits/Ac/ObUtils.php @@ -292,11 +292,6 @@ public function outputBufferCallbackHandler($buffer, $phase) if (stripos($cache, '') !== false) { return (boolean) $this->maybeSetDebugInfo($this::NC_DEBUG_WP_ERROR_PAGE); } - if (!$this->functionIsPossible('http_response_code')) { - if (stripos($cache, 'database error') !== false) { - return (boolean) $this->maybeSetDebugInfo($this::NC_DEBUG_WP_ERROR_PAGE); - } - } if (!$this->hasACacheableContentType()) { return (boolean) $this->maybeSetDebugInfo($this::NC_DEBUG_UNCACHEABLE_CONTENT_TYPE); } diff --git a/src/includes/traits/Shared/HttpUtils.php b/src/includes/traits/Shared/HttpUtils.php index 29f11b93..d894ee0d 100644 --- a/src/includes/traits/Shared/HttpUtils.php +++ b/src/includes/traits/Shared/HttpUtils.php @@ -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.