We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c8f6bd commit 7f6b301Copy full SHA for 7f6b301
src/Model/AbstractObjectActivity.php
@@ -75,13 +75,13 @@ public function cmfUpdateData(array $data)
75
76
public static function cmfCreate(array $data, $fromWebservice = false)
77
{
78
+ $object = null;
79
if (!empty($data['o_id'])) {
80
$object = self::getById($data['o_id']);
81
- if (!$object) {
82
- throw new \Exception(sprintf('object with o_id %s not found', $data['o_id']));
83
- }
84
- } else {
+ }
+
+ if(is_null($object)) {
85
$object = new static;
86
}
87
0 commit comments