From 68ccaaace02904e8d611146f58f6987e77ff7075 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 4 Jun 2024 07:27:45 +0200 Subject: [PATCH] address unit test failures due to strict typing --- lib/Data/AbstractData.php | 2 +- tst/I18nTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Data/AbstractData.php b/lib/Data/AbstractData.php index 922cdf5d..8e8c8bd5 100644 --- a/lib/Data/AbstractData.php +++ b/lib/Data/AbstractData.php @@ -181,7 +181,7 @@ abstract class AbstractData protected function getOpenSlot(array &$comments, $postdate) { if (array_key_exists($postdate, $comments)) { - $parts = explode('.', $postdate, 2); + $parts = explode('.', (string) $postdate, 2); if (!array_key_exists(1, $parts)) { $parts[1] = 0; } diff --git a/tst/I18nTest.php b/tst/I18nTest.php index 9c013f8b..14292400 100644 --- a/tst/I18nTest.php +++ b/tst/I18nTest.php @@ -198,7 +198,7 @@ class I18nTest extends TestCase $languageCount = 0; foreach ($languageIterator as $file) { ++$languageCount; - $this->assertTrue(copy($file, $path . DIRECTORY_SEPARATOR . $file->getBasename())); + $this->assertTrue(copy($file->getPathname(), $path . DIRECTORY_SEPARATOR . $file->getBasename())); } I18nMock::resetPath($path);