Thanks to visit codestin.com
Credit goes to github.com

Skip to content

API attachment update can result in a Undefined array key "name" error #5353

@ssddanbrown

Description

@ssddanbrown

Describe the Bug

Performing an API attachment update following the API docs can result in a Undefined array key "name" error.
This is because the name is not required for validation, but assumed to be set in the called service:

$attachment->name = $requestData['name'];

Steps to Reproduce

  1. Perform API attachment update call without a name parameter.
  2. See 500 error

Expected Behaviour

API call succeeds and no error thrown.

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v24.10.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions