diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 8a3d0eceae..656afc0fa7 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -2323,7 +2323,9 @@ function install_config_import_batch() { // Match up the site UUIDs, the install_base_system install task will have // installed the system module and created a new UUID. $system_site = $sync->read('system.site'); - \Drupal::configFactory()->getEditable('system.site')->set('uuid', $system_site['uuid'] ?? NULL)->save(); + if ($system_site !== FALSE) { + \Drupal::configFactory()->getEditable('system.site')->set('uuid', $system_site['uuid'])->save(); + } // Create the storage comparer and the config importer. $storage_comparer = new StorageComparer($sync, \Drupal::service('config.storage')); diff --git a/core/lib/Drupal/Core/Security/RequestSanitizer.php b/core/lib/Drupal/Core/Security/RequestSanitizer.php index 11bd82e517..a778e4be4e 100644 --- a/core/lib/Drupal/Core/Security/RequestSanitizer.php +++ b/core/lib/Drupal/Core/Security/RequestSanitizer.php @@ -153,7 +153,7 @@ protected static function checkDestination($destination, array $whitelist) { protected static function stripDangerousValues($input, array $whitelist, array &$sanitized_keys) { if (is_array($input)) { foreach ($input as $key => $value) { - if (is_integer($key) || ($key !== '' && $key[0] === '#' && !in_array($key, $whitelist, TRUE))) { + if ($key !== '' && ((string) $key)[0] === '#' && !in_array($key, $whitelist, TRUE)) { unset($input[$key]); $sanitized_keys[] = $key; }