Skip to content

Commit

Permalink
issue #269: Undefined index: revision (#284)
Browse files Browse the repository at this point in the history
Fix an undefined index notice/warning when calling the
DocumentHandler::put function with a `revision` option set.
  • Loading branch information
jsteemann authored Jun 9, 2021
1 parent cbd2e44 commit e97c135
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ArangoDBClient/DocumentHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -757,9 +757,10 @@ protected function put($url, $collection, $documentId, Document $document, array
if (isset($params[ConnectionOptions::OPTION_REPLACE_POLICY]) &&
$params[ConnectionOptions::OPTION_REPLACE_POLICY] === UpdatePolicy::ERROR
) {
if (null !== $options['revision']) {
$revision = $document->getRevision();
if (null !== $revision) {
$params['ignoreRevs'] = false;
$headers['if-match'] = '"' . $options['revision'] . '"';
$headers['if-match'] = '"' . $revision . '"';
}
}

Expand Down

0 comments on commit e97c135

Please sign in to comment.