Problem/Motivation

TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (row 37 of fastly.webhook.inc).

Steps to reproduce

Try editing some node.

Proposed resolution

Check if the variable is null or empty.

Probably related: https://www.drupal.org/project/fastly/issues/2915670#comment-13079890

CommentFileSizeAuthor
#2 3408149-2.patch1.2 KBtormi

Issue fork fastly-3408149

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tormi created an issue. See original summary.

tormi’s picture

Version: 7.x-2.6 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1.2 KB

I added a patch.

tormi’s picture

Status: Needs review » Active

Tests doesn't trigger..

tormi’s picture

Status: Active » Needs review

apotek made their first commit to this issue’s fork.

apotek’s picture

The contributed patch by @tormi is good.

I am also adding an alternative approach that forces expected type, and opened a merge request with this alternative approach.

vvuksan-fastly’s picture

Merged into 7.x-2.x

vvuksan-fastly’s picture

Status: Needs review » Fixed
vvuksan-fastly’s picture

Status: Fixed » Closed (fixed)