From ac54c8dbbd55909e4eeccbdcbdfb43478cba88c2 Mon Sep 17 00:00:00 2001
Date: Tue, 7 May 2019 17:45:55 +0200
Subject: [PATCH] Build: exit with error code 1 when WP requirements are not
met
---
src/wp-includes/load.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php
index 05d37f5a79..1821f053e3 100644
a
|
b
|
function wp_check_php_mysql_versions() { |
136 | 136 | header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 ); |
137 | 137 | header( 'Content-Type: text/html; charset=utf-8' ); |
138 | 138 | /* translators: 1: Current PHP version number, 2: WordPress version number, 3: Minimum required PHP version number */ |
139 | | die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); |
| 139 | printf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ); |
| 140 | exit( 1 ); |
140 | 141 | } |
141 | 142 | |
142 | 143 | if ( ! extension_loaded( 'mysql' ) && ! extension_loaded( 'mysqli' ) && ! extension_loaded( 'mysqlnd' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) { |
… |
… |
function wp_check_php_mysql_versions() { |
145 | 146 | $protocol = wp_get_server_protocol(); |
146 | 147 | header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 ); |
147 | 148 | header( 'Content-Type: text/html; charset=utf-8' ); |
148 | | die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); |
| 149 | echo __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ); |
| 150 | exit( 1 ); |
149 | 151 | } |
150 | 152 | } |
151 | 153 | |