Files
wordpress/wp-includes/version.php
johnjamesjacoby ff31fa4b12 Canonical: prevent "Undefined array key" PHP warnings when host is not set.
This change is necessary to prevent scanning tools from polluting debug/error logs of some hosting configurations with PHP warnings simply by omitting the Host header from their requests.

This commit makes sure that all of the required `host`, `path`, `query`, and `scheme` array keys inside of the `redirect_canonical()` function are always set after various operations have been performed on them.

It also includes 1 new test case and 2 additional tests, to verify the problem and its fix are working as intended, as well as a small modification to the `get_canonical()` phpunit helper specifically to account for `HTTP_HOST` maybe not being set.

Props artz91, johnjamesjacoby, mindctrl, sirlouen.

Fixes #63316.
Built from https://develop.svn.wordpress.org/trunk@61136


git-svn-id: http://core.svn.wordpress.org/trunk@60472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-11-04 18:31:29 +00:00

58 lines
1.1 KiB
PHP

<?php
/**
* WordPress Version
*
* Contains version information for the current WordPress release.
*
* @package WordPress
* @since 1.2.0
*/
/**
* The WordPress version string.
*
* Holds the current version number for WordPress core. Used to bust caches
* and to enable development mode for scripts when running from the /src directory.
*
* @global string $wp_version
*/
$wp_version = '6.9-beta3-61136';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
*
* @global int $wp_db_version
*/
$wp_db_version = 60717;
/**
* Holds the TinyMCE version.
*
* @global string $tinymce_version
*/
$tinymce_version = '49110-20250317';
/**
* Holds the minimum required PHP version.
*
* @global string $required_php_version
*/
$required_php_version = '7.2.24';
/**
* Holds the names of required PHP extensions.
*
* @global string[] $required_php_extensions
*/
$required_php_extensions = array(
'json',
'hash',
);
/**
* Holds the minimum required MySQL version.
*
* @global string $required_mysql_version
*/
$required_mysql_version = '5.5.5';