Skip to content

PHP Warning due to passing null as haystack value for in_array() #4145

@northernbeacheswebsites

Description

Bug Description

Getting the following PHP Error: Warning: in_array() expects parameter 2 to be array, null given in .../plugins/amp/includes/class-amp-theme-support.php on line 1533 this can be seen here: https://www.dropbox.com/s/n25ufth7yzt5n86/amp-error.jpg?dl=0

Expected Behaviour

There should be no PHP error

Steps to reproduce

Plugin is activated and I have standard settings activated as shown here: https://www.dropbox.com/s/8cetg3lu39vluc5/amp-settings.jpg?dl=0

Screenshots

As shown above

Additional context

  • WordPress version: 5.3.2
  • Plugin version: 1.4.2
  • PHP version: 7.1.33
  • Server: Apache

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingP2Low priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions