From 430365ba79a5d4b2e9afccd6973c52965fae138c Mon Sep 17 00:00:00 2001 From: Nathan Boiron Date: Tue, 14 Aug 2018 17:45:27 +0200 Subject: [PATCH] wip --- Classes/AssetHandler/Html/DataAttributesAssetHandler.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Classes/AssetHandler/Html/DataAttributesAssetHandler.php b/Classes/AssetHandler/Html/DataAttributesAssetHandler.php index d5b0b7d..72441bc 100644 --- a/Classes/AssetHandler/Html/DataAttributesAssetHandler.php +++ b/Classes/AssetHandler/Html/DataAttributesAssetHandler.php @@ -23,6 +23,7 @@ use Throwable; use Traversable; use TYPO3\CMS\Extbase\Error\Result; +use TYPO3\CMS\Extbase\Reflection\Exception\PropertyNotAccessibleException; use TYPO3\CMS\Extbase\Reflection\ObjectAccess; /** @@ -59,7 +60,11 @@ public function getFieldsValuesDataAttributes(FormResult $formResult) $fieldName = $field->getName(); if (false === $formResult->fieldIsDeactivated($field)) { - $value = ObjectAccess::getProperty($formInstance, $fieldName); + try { + $value = ObjectAccess::getProperty($formInstance, $fieldName); + } catch (PropertyNotAccessibleException $exception) { + continue; + } try { $value = $this->formatValue($value);