From ea7f60a98cf43c43957fc4bd33272c2a64c44efc Mon Sep 17 00:00:00 2001 From: marcel-mathias-nolte Date: Fri, 18 Feb 2022 14:30:46 +0100 Subject: [PATCH] Fix error in Contao 4.13 / PHP 8.1 --- src/Resources/contao/classes/Hooks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Resources/contao/classes/Hooks.php b/src/Resources/contao/classes/Hooks.php index 541bc88..f8113c0 100644 --- a/src/Resources/contao/classes/Hooks.php +++ b/src/Resources/contao/classes/Hooks.php @@ -79,14 +79,14 @@ public function handleManipulationsBackend($arrFiles) public function handleButtonManipulate() { // handle button edit - if ($_POST['FORM_SUBMIT'] == 'tl_files' && isset($_POST['manipulate'])) + if (is_array($_POST) && isset($_POST['FORM_SUBMIT']) && $_POST['FORM_SUBMIT'] == 'tl_files' && isset($_POST['manipulate'])) { // manipulate the selected image Imagine::handleButtonEdit([TL_ROOT.'/'.$_GET['id']], $_POST['manipulation']); } // handle button edit all - if ($_POST['FORM_SUBMIT'] == 'tl_select' && isset($_POST['manipulate'])) + if (is_array($_POST) && isset($_POST['FORM_SUBMIT']) && $_POST['FORM_SUBMIT'] == 'tl_select' && isset($_POST['manipulate'])) { if (is_array($_POST['IDS']) && !empty($_POST['IDS'])) {