diff --git a/CHANGELOG.md b/CHANGELOG.md index 99cfce9..a13e90e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,3 +93,5 @@ 7.3.5: Add antispam form theme. 7.3.7: Added template for price on request + +7.3.8: Catch exception in Cloner::setValue(). diff --git a/Cloner/Cloner.php b/Cloner/Cloner.php index a5946e6..4af98e5 100644 --- a/Cloner/Cloner.php +++ b/Cloner/Cloner.php @@ -192,8 +192,11 @@ private function setValue(object $object, \ReflectionClass $reflectionClass, str return; } catch (\Exception $ex) { } - - $reflectionProperty = $reflectionClass->getProperty($property); + try { + $reflectionProperty = $reflectionClass->getProperty($property); + } catch (\Exception $ex) { + return; + } $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($object, $value);