diff --git a/phpmyfaq/src/phpMyFAQ/Controller/Frontend/SetupController.php b/phpmyfaq/src/phpMyFAQ/Controller/Frontend/SetupController.php index 8bc1a17aa2..53b0c13d9e 100644 --- a/phpmyfaq/src/phpMyFAQ/Controller/Frontend/SetupController.php +++ b/phpmyfaq/src/phpMyFAQ/Controller/Frontend/SetupController.php @@ -30,6 +30,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Annotation\Route; +use Twig\Error\LoaderError; class SetupController { @@ -148,7 +149,7 @@ public function update(Request $request): Response * @param string[] $templateVars * @param Response|null $response * @return Response - * @throws Exception + * @throws Exception|LoaderError */ public function render(string $pathToTwigFile, array $templateVars = [], ?Response $response = null): Response { From b78d5f9c47a0b38c8a1150906c7ae07adae87dcb Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Fri, 3 Jan 2025 09:38:28 +0100 Subject: [PATCH 5/6] fix: corrected check on uploaded category image --- phpmyfaq/admin/category.main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpmyfaq/admin/category.main.php b/phpmyfaq/admin/category.main.php index 2801d3af1e..ca48f52114 100644 --- a/phpmyfaq/admin/category.main.php +++ b/phpmyfaq/admin/category.main.php @@ -189,7 +189,7 @@ $categoryLang = Filter::filterInput(INPUT_POST, 'catlang', FILTER_SANITIZE_SPECIAL_CHARS); $existingImage = Filter::filterInput(INPUT_POST, 'existing_image', FILTER_SANITIZE_SPECIAL_CHARS); $existingImage = is_null($existingImage) ? '' : $existingImage; - $image = count($uploadedFile) ? $categoryImage->getFileName( + $image = ($uploadedFile instanceof UploadedFile) ? $categoryImage->getFileName( $categoryId, $categoryLang ) : $existingImage; From 677bbafcc31c0b38195b1022e9aba76890a14f2c Mon Sep 17 00:00:00 2001 From: Thorsten Rinne Date: Fri, 3 Jan 2025 10:07:24 +0100 Subject: [PATCH 6/6] chore: v4.0.3 release --- CHANGELOG.md | 3 ++- package.json | 2 +- phpmyfaq/src/phpMyFAQ/System.php | 2 +- scripts/version.sh | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14162c0393..03d1b04efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,10 @@ This is a log of major user-visible changes in each phpMyFAQ release. -### phpMyFAQ v4.0.3 - unreleased +### phpMyFAQ v4.0.3 - 2025-01-03 - fixed installation bug introduced with v4.0.2 (Thorsten) +- fixed minor bug (Thorsten) ### phpMyFAQ v4.0.2 - 2025-01-02 diff --git a/package.json b/package.json index 4e9e6db2e3..44a740277e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@thorsten/phpmyfaq", - "version": "4.0.2", + "version": "4.0.3", "description": "phpMyFAQ", "repository": "git://github.com/thorsten/phpMyFAQ.git", "author": "Thorsten Rinne", diff --git a/phpmyfaq/src/phpMyFAQ/System.php b/phpmyfaq/src/phpMyFAQ/System.php index 36ac26d5a4..ad741a7ace 100644 --- a/phpmyfaq/src/phpMyFAQ/System.php +++ b/phpmyfaq/src/phpMyFAQ/System.php @@ -47,7 +47,7 @@ class System /** * Patch level. */ - private const VERSION_PATCH_LEVEL = 2; + private const VERSION_PATCH_LEVEL = 3; /** * Pre-release version. diff --git a/scripts/version.sh b/scripts/version.sh index 3b9b8797eb..45c8048e1e 100644 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -1,5 +1,5 @@ #!/bin/sh # Check if PMF_VERSION is not set or empty if [ -z "${PMF_VERSION}" ]; then - PMF_VERSION="4.0.2" + PMF_VERSION="4.0.3" fi