Changeset 59803 for trunk/src/wp-includes/load.php
- Timestamp:
- 02/11/2025 11:12:03 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/load.php
r59242 r59803 148 148 * @access private 149 149 * 150 * @global string $required_php_version The required PHP version string. 151 * @global string $wp_version The WordPress version string. 150 * @global string $required_php_version The required PHP version string. 151 * @global string[] $required_php_extensions The names of required PHP extensions. 152 * @global string $wp_version The WordPress version string. 152 153 */ 153 154 function wp_check_php_mysql_versions() { 154 global $required_php_version, $ wp_version;155 global $required_php_version, $required_php_extensions, $wp_version; 155 156 156 157 $php_version = PHP_VERSION; … … 166 167 $required_php_version 167 168 ); 169 exit( 1 ); 170 } 171 172 $missing_extensions = array(); 173 174 if ( isset( $required_php_extensions ) && is_array( $required_php_extensions ) ) { 175 foreach ( $required_php_extensions as $extension ) { 176 if ( extension_loaded( $extension ) ) { 177 continue; 178 } 179 180 $missing_extensions[] = sprintf( 181 'WordPress %1$s requires the <code>%2$s</code> PHP extension.', 182 $wp_version, 183 $extension 184 ); 185 } 186 } 187 188 if ( count( $missing_extensions ) > 0 ) { 189 $protocol = wp_get_server_protocol(); 190 header( sprintf( '%s 500 Internal Server Error', $protocol ), true, 500 ); 191 header( 'Content-Type: text/html; charset=utf-8' ); 192 echo implode( '<br>', $missing_extensions ); 168 193 exit( 1 ); 169 194 }
Note: See TracChangeset
for help on using the changeset viewer.