diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index bdb0a07..c3de7e8 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -1946,7 +1946,7 @@ function install_check_translations($langcode, $server_pattern) { // lengthen a filename. There is no predictable root directory depth beyond // which Drupal will not function correctly on Windows, thus we only warn if // Drupal is being installed more than 100 characters deep in the filesystem. - if (strpos(strtolower(php_uname('s')), 'win') === 0) { + if (substr(PHP_OS, 0, 3) == 'WIN') { $depth = strlen(realpath(DRUPAL_ROOT)); if ($depth > 100) { $requirements['max_path_on_windows'] = [ diff --git a/core/tests/Drupal/Tests/Component/Utility/CryptTest.php b/core/tests/Drupal/Tests/Component/Utility/CryptTest.php index 16c4120..e1fc45c 100644 --- a/core/tests/Drupal/Tests/Component/Utility/CryptTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/CryptTest.php @@ -4,6 +4,7 @@ use Drupal\Tests\UnitTestCase; use Drupal\Component\Utility\Crypt; +use InvalidArgumentException; /** * Tests random byte generation. @@ -107,10 +108,10 @@ public function testShortHash($data, $key, $length, $expected_hash) { /** * Tests the shortHash method with invalid parameters. * - * @expectedException InvalidArgumentException * @covers ::shortHash */ public function testShortHashInvalid() { + $this->setExpectedException(InvalidArgumentException::class, 'shortHash length 51 is longer than the maximum allowed of 50.'); Crypt::shortHash('Length is too long', 'secret', 51); }