Skip to content

Check if $header and $footer are not null #4099

@vpecinka

Description

@vpecinka

Hi,

I found the following problem in the Nextcloud project, where this code is used in Forms appliaction. It crashes for me because $header and $footer variables are null.

I sugest to fix the code with isset() test here:

The safe code should look like: $headerProperties = isset($header) ? $header->getElementsByTagNameNS($this->stylesNs, 'header-footer-properties')[0] : null;

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