Hi there,

I'm getting the below error when trying to access /admin/modules page

Error: [] operator not supported for strings in glossify_help() (line 41 of /var/www/html/sites/all/modules/glossify/glossify.module).

I'm using Drupal 7.56 and PHP version 7.1.9
Glossify version: 7.x-4.0-beta1+15-dev

The problem is on line 40, where $items variable is initialised as ''; instead of [];

Attached patch fixes it.

CommentFileSizeAuthor
#4 fatal_error-2910486-4.patch855 bytesrivimey
glossify.module.patch994 bytesdrOptimum

Comments

drOptimum created an issue. See original summary.

drOptimum’s picture

Issue summary: View changes
drOptimum’s picture

Downgrading to php 7.0 also fixes the issue

rivimey’s picture

Assigned: drOptimum » Unassigned
Status: Active » Needs review
StatusFileSize
new855 bytes

Fundamentally, this patch is good, so RTBC on that point, but IMO the empty array should be expressed as "array()" both for consistency with other uses in this function and also for compatibility with older versions of php which might still be using this module.

Additionally, patches should be created from within the module folder, not outside it, so this patch doesn't apply properly e.g. in drush make.

Attached is an update which fixes these.

drOptimum’s picture

drOptimum’s picture

Status: Needs review » Reviewed & tested by the community
mfb’s picture

Priority: Normal » Critical

Upping priority to critical as it's a fatal error and trivial patch :)

anybody’s picture

Can we please have a new release containing this fix? If there's no active maintainer, I'd like to offer my help!

keesje’s picture

Hi Julian, I would be happy to add you as co-maintainer since I only maintain the D8 version. I dont have that permissions though, I just sended the projects owner a request to hand me those. Alternatively you could send a request yourself: https://www.drupal.org/u/worldfallz

keesje’s picture

I have no problem adding this patch though, its just that Im not going to test/check anything myself on D7 ;-)

anybody’s picture

Hi keesje,

thank you. You can definitely commit this patch - it's fixing a logical mistake. It can only become better ;)

  • keesje committed a08c906 on 7.x-4.x
    Issue #2910486 by drOptimum, rivimey: Fatal error: [] operator not...
keesje’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

drOptimum’s picture