From 0703ba8a51b6b4b8ff3d5346762601de35d439be Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Wed, 22 Feb 2023 11:07:49 +0700 Subject: [PATCH] MDL-77354 tool_behat: Fix deprecated strlen() of null in PHP 8.1 --- admin/tool/behat/cli/util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/tool/behat/cli/util.php b/admin/tool/behat/cli/util.php index 8b39c7ce22e..f2649cd4f53 100644 --- a/admin/tool/behat/cli/util.php +++ b/admin/tool/behat/cli/util.php @@ -360,7 +360,7 @@ function print_combined_drop_output($processes) { $op = $process->getIncrementalOutput(); if (trim($op)) { $update = preg_filter('#^\s*([FS\.\-]+)(?:\s+\d+)?\s*$#', '$1', $op); - $strlentoprint = strlen($update); + $strlentoprint = $update ? strlen($update) : 0; // If not enough dots printed on line then just print. if ($strlentoprint < $remainingprintlen) {