Warning: foreach() argument must be of type array|object, null given in tacjs_page_attachments() (line 35 of modules/contrib/tacjs/tacjs.module)

Created on 12 June 2025, 30 days ago

Problem/Motivation

Warning: foreach() argument must be of type array|object, null given in tacjs_page_attachments() (line 35 of modules/contrib/tacjs/tacjs.module)

Steps to reproduce

fresh drupal 11 install + composer require tacs 7.0 rc2 + drush en

Proposed resolution

add a is_null on $services before the foreach

if(!is_null($services)) {
  foreach ($services as $service_name => $service) {
    if ($service['status']) {
      $active_services[$service_name] = $service;
     }
  }
}
🐛 Bug report
Status

Active

Version

7.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024