Skip to content

Commit 31740b2

Browse files
committed
fix issue #242
1 parent 1582959 commit 31740b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/ArangoDBClient/Edge.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,12 @@ public function getTo()
168168
public function getAllForInsertUpdate()
169169
{
170170
$data = parent::getAllForInsertUpdate();
171-
$data['_from'] = $this->_from;
172-
$data['_to'] = $this->_to;
171+
if ($this->_from !== null) {
172+
$data['_from'] = $this->_from;
173+
}
174+
if ($this->_to !== null) {
175+
$data['_to'] = $this->_to;
176+
}
173177

174178
return $data;
175179
}

0 commit comments

Comments
 (0)