Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

v3.5.0 , DocumentHandler, Undefined index: revision #269

Open
@RysQ

Description

@RysQ

if (isset($params[ConnectionOptions::OPTION_REPLACE_POLICY]) &&
$params[ConnectionOptions::OPTION_REPLACE_POLICY] === UpdatePolicy::ERROR
) {
if (null !==$options['revision']) {
$params['ignoreRevs'] =false;
$headers['if-match'] ='"' .$options['revision'] .'"';
}
}

Line 651 may cause "Undefined index" Notice

'revision' option may not be set in$options param ofput. Docs ofreplace andreplaceById methods doesn't mention it should be provided. Instead it points out to Document's _rev.

So please consider (accordingly topatch method), to base the condition on something like:

$revision =$document->getRevision();if (null !==$revision) {...

or provide'revision' option/param withinreplace orreplaceById methods (ie. like it's done inremove)


The issue doesn't appears in < 3.5.0 , since in previous versionsincludeOptionsInParams inArangoDBClient/Handler returns empty array when its$options param is empty.
Condition result:

if (isset($params[ConnectionOptions::OPTION_REPLACE_POLICY]) &&$params[ConnectionOptions::OPTION_REPLACE_POLICY] === UpdatePolicy::ERROR )

is always false then

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp