Skip to content

Commit

Permalink
Catch exception in Cloner::setValue().
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Nikolaev committed Mar 12, 2020
1 parent 1615f06 commit e98bc3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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().
7 changes: 5 additions & 2 deletions Cloner/Cloner.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e98bc3b

Please sign in to comment.