Filesystem API: Check `PHP_OS_FAMILY` instead of `php_uname()` in PclZip.
The `php_uname()` function can be disabled on some hosts, in which case the call fails. The `PHP_OS_FAMILY` constant indicates the operating system family PHP was built for, and is available as of PHP 7.2.0. Reference: [https://www.php.net/manual/en/reserved.constants.php#constant.php-os-family PHP Manual: Predefined Constants: PHP_OS_FAMILY]. Follow-up to [6779], [57985], [58678], [58684]. Props daymobrew, costdev, desrosj. Fixes #57711. Built from https://develop.svn.wordpress.org/trunk@59506 git-svn-id: http://core.svn.wordpress.org/trunk@58892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
caaf759d21
commit
56f776835d
|
@ -5714,7 +5714,7 @@
|
|||
// --------------------------------------------------------------------------------
|
||||
function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
|
||||
{
|
||||
if (stristr(php_uname(), 'windows')) {
|
||||
if (PHP_OS_FAMILY == 'Windows') {
|
||||
// ----- Look for potential disk letter
|
||||
if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
|
||||
$p_path = substr($p_path, $v_position+1);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.8-alpha-59505';
|
||||
$wp_version = '6.8-alpha-59506';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue