From a8f05ac00ae479f75d5a97512870724cd0bc6742 Mon Sep 17 00:00:00 2001 From: "Christian F." Date: Tue, 7 Jan 2025 15:23:53 +0100 Subject: [PATCH] Added check if `dataUri` exists (#650) * Update DataUriAdapter.php Added check if `dataUri` is present * Apply php-cs-fixer changes --------- Co-authored-by: Corepex --- src/Asset/Updater/Adapter/DataUriAdapter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Asset/Updater/Adapter/DataUriAdapter.php b/src/Asset/Updater/Adapter/DataUriAdapter.php index c9fe65d1..104740d9 100644 --- a/src/Asset/Updater/Adapter/DataUriAdapter.php +++ b/src/Asset/Updater/Adapter/DataUriAdapter.php @@ -21,6 +21,7 @@ use Pimcore\Model\Asset; use Pimcore\Model\Element\ElementInterface; use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag; +use function array_key_exists; /** * @internal @@ -32,7 +33,7 @@ public function update(ElementInterface $element, array $data): void { - if (!$element instanceof Asset) { + if (!$element instanceof Asset || !array_key_exists($this->getIndexKey(), $data)) { return; }