aboutsummaryrefslogtreecommitdiffstats
path: root/includes/Request/FauxResponse.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Request/FauxResponse.php')
-rw-r--r--includes/Request/FauxResponse.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/Request/FauxResponse.php b/includes/Request/FauxResponse.php
index 6154efef73d1..4aee59d89dd4 100644
--- a/includes/Request/FauxResponse.php
+++ b/includes/Request/FauxResponse.php
@@ -45,7 +45,7 @@ class FauxResponse extends WebResponse {
* @param null|int $http_response_code Forces the HTTP response code to the specified value.
*/
public function header( $string, $replace = true, $http_response_code = null ) {
- if ( substr( $string, 0, 5 ) == 'HTTP/' ) {
+ if ( str_starts_with( $string, 'HTTP/' ) ) {
$parts = explode( ' ', $string, 3 );
$this->code = intval( $parts[1] );
} else {