Views plugin query: TypeError: explode(): Argument #2 ($string) must be of type string

Created on 20 December 2023, 6 months ago
Updated 4 January 2024, 6 months ago

Problem/Motivation

Using PHP 8.0 we can't change the Display Override option under the Query Settings modal.

Steps to reproduce

  1. Install D7 with PHP 8.0
  2. Create any view
  3. Click on the "Advanced" -> "Other" -> "Query settings" -> "" link
  4. Change the Display Override option (first select element in the modal)
  5. Click on the "Apply (this display)" button

Actual result with an error:

TypeError: explode(): Argument #2 ($string) must be of type string, array given in explode() (line 310 of /[WEBSITE]/sites/all/modules/views/plugins/views_plugin_query_default.inc).

Proposed resolution

  1. Fix the issue.
  2. Add tests to the Views UI to prevent an error in the future.

Remaining tasks

No

User interface changes

No

API changes

No

Data model changes

No

πŸ› Bug report
Status

Fixed

Version

3.0

Component

User interface

Created by

πŸ‡ΊπŸ‡¦Ukraine tibezh

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024