in_array(): Argument #2 ($haystack) must be of type array, bool given in ViewsBulkOperationsActionManager.php on line 102

Created on 23 December 2022, over 1 year ago
Updated 7 November 2023, 8 months ago

Problem/Motivation

the specified line reads:

if (!\in_array('Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionInterface', \class_implements($definition['class']))) {

the problem seems to be that 'class_implement()' can also return FALSE, when class not implements. Thus give the wrong type to 'in_array'

Steps to reproduce

Not sure how to reproduce

Proposed resolution

Check whether if( \class_implements() !== FALSE)

Remaining tasks

create patch

πŸ› Bug report
Status

Closed: works as designed

Version

4.1

Component

Core

Created by

πŸ‡³πŸ‡±Netherlands Rop Rotterdam

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¬πŸ‡§United Kingdom vladigor

    I understand and appreciate the reasons for closing this ticket.

    In case it helps anyone stumbling across this problem in future:
    I experienced this problem due to a typo in the namespace of my custom action class file.
    My advice would be to check the namespace, and also to check that your class name matches the filename of your action class.

  • πŸ‡ͺπŸ‡ΈSpain psf_ Huelva

    +1

Production build 0.69.0 2024