TypeError: strcasecmp(): Argument #1 ($string1) must be of type string, array given in strcasecmp()

Created on 29 September 2022, about 2 years ago
Updated 6 February 2023, almost 2 years ago

Problem/Motivation

PHP8.0 Compatability: TypeError: strcasecmp(): Argument #1 ($string1) must be of type string, array given in strcasecmp()

Steps to reproduce

  1. Update PHP version to 8.0 in PANTHEON
  2. Check sites status /admin/reports/status
🐛 Bug report
Status

Postponed: needs info

Version

7.0 ⚰️

Component
System 

Last updated 1 day ago

No maintainer
Created by

🇮🇳India harivansh

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

Comments & Activities

Not all content is available!

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

  • 🇼🇸Samoa ainsofs

    #2 worked for me thnx. Not sure how to track down which module is causing it as suggested by @poker10

  • Status changed to Needs review 1 day ago
  • 🇮🇳India harivansh

    In the system.install file, the Unicode requirements are merged into the $requirements array using the system_requirements function:

    $requirements = array_merge($requirements, unicode_requirements());
    

    However, when the system status page is loaded, the module_invoke_all function is invoked. This function attempts to merge the requirements recursively. Since the Unicode requirements are processed twice, it results in nested arrays being created due to the recursive merge.
    Solution:
    We can overlap keys to overwrite previous values (instead of merging them), using array_merge instead of array_merge_recursive.

Production build 0.71.5 2024