From 4acf87f43d170e990e86bb47ee249bc0fdbb1cdf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Feb 2024 12:46:20 +0100 Subject: [PATCH] Fix warning --- test/phpunit/LangTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 1074ccad2b8..f7b43ddb6e3 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -165,13 +165,13 @@ class LangTest extends CommonClassTest $reg = array(); $result = preg_match('/(.*)\'notranslate\'/im', $filecontent, $reg); // A sequence of char we don't want //print __METHOD__." Result for checking we don't have bad percent char = ".$result."\n"; - $this->assertTrue($result == 0, 'Found a sequence tag \'notranslate\' into the translation file '.$code.'/'.$file.' in line '.$reg[1]); + $this->assertTrue($result == 0, 'Found a sequence tag \'notranslate\' into the translation file '.$code.'/'.$file.' in line '.empty($reg[1]) ? '' : $reg[1]); if (!in_array($code, array('ar_SA'))) { $reg = array(); $result = preg_match('/(.*)<([^a-z\/\s,=\(]1)/im', $filecontent, $reg); // A sequence of char we don't want //print __METHOD__." Result for checking we don't have bad percent char = ".$result."\n"; - $this->assertTrue($result == 0, 'Found a sequence tag <'.$reg[2].' into the translation file '.$code.'/'.$file.' in line '.$reg[1]); + $this->assertTrue($result == 0, 'Found a sequence tag <'.(empty($reg[2]) ? '': $reg[2]).' into the translation file '.$code.'/'.$file.' in line '.empty($reg[1]) ? '' : $reg[1]); } } }