TypeError: explode(): Argument #3 ($limit) must be of type int, string given in explode()

Created on 20 January 2023, almost 2 years ago

Problem/Motivation

When installing a site with install profile having dependency on notifications widget module we are the getting the following error

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /core/install.php?profile=ezdevportal&langcode=en&id=1&op=do_nojs&op=do
StatusText: OK
ResponseText: TypeError: explode(): Argument #3 ($limit) must be of type int, string given in explode() (line 92 of /var/www/html/modules/contrib/notificationswidget/notifications_widget.module).

Steps to reproduce

The development server should be running on php 8.1 or higher.

  1. Create a custom installation profile and add the notificationswidget as a module.
  2. Run the drupal site install process
  3. Observe the error the during the installation process

Proposed resolution

Apply the null coalescing operator for the explode functions using proper syntax

Remaining tasks

Validate the proposed fix.

User interface changes

None

API changes

None

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India arisen Goa

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.

Production build 0.71.5 2024