From 73116db19cb6c80784426afb98b251fc96317274 Mon Sep 17 00:00:00 2001 From: catch Date: Mon, 13 Jan 2020 18:56:45 +0000 Subject: [PATCH] Issue #3104421 by peterkokot: PHP 7.4 deprecated reverse order of glue and pieces in implode --- core/lib/Drupal/Core/FileTransfer/FileTransfer.php | 2 +- .../inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php index 9e4148824ef..c1b3055b444 100644 --- a/core/lib/Drupal/Core/FileTransfer/FileTransfer.php +++ b/core/lib/Drupal/Core/FileTransfer/FileTransfer.php @@ -363,7 +363,7 @@ abstract class FileTransfer { $parts = explode('/', $path); $chroot = ''; while (count($parts)) { - $check = implode($parts, '/'); + $check = implode('/', $parts); if ($this->isFile($check . '/' . \Drupal::service('file_system')->basename(__FILE__))) { // Remove the trailing slash. return substr($chroot, 0, -1); diff --git a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php index d0937aed51e..5aff4094edc 100644 --- a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php +++ b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php @@ -138,7 +138,7 @@ class FormErrorHandlerTest extends UnitTestCase { foreach ($render_array[1]['#items'] as $item) { $links[] = htmlspecialchars($item['#title']); } - return $render_array[0]['#markup'] . '' . implode($links, '') . ''; + return $render_array[0]['#markup'] . '' . implode('', $links) . ''; })); $form_state = new FormState();