Hello, since PHP 7.4 the curly brace syntax for accessing array elements is deprecated and will be removed in PHP 8+.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

peterkokot created an issue. See original summary.

peterkokot’s picture

solideogloria’s picture

Question, why do some of the changes use substr and some use brackets?

jcnventura’s picture

I think because the ones that use substr might not be strings already, and as such need to be cast to string during the substr call. However, it would be good to have it better investigated.

solideogloria’s picture

Right, that's what I thought too. But then, if you look at the same line after that, it calls substr() on the same variable without casting first. So I'm not sure. Also, $objects->not() and $objects->filter() both take callable, and I can't figure out what can be a callable that can also have substr() called on it without a Fatal Error.

Essentially, I can't even figure out what it's doing now, or if it's even working as-is.

Some simple PHP to try online

Reference for callables: https://www.php.net/manual/en/language.types.callable.php

ugintl’s picture

Patch not applying on latest dev

solideogloria’s picture

Status: Needs review » Needs work
Issue tags: -ContributionWeekend2020 +ContributionWeekend2020 Needs reroll
solideogloria’s picture

Issue tags: -ContributionWeekend2020 Needs reroll +ContributionWeekend2020, +Needs reroll
Pooja Ganjage’s picture

StatusFileSize
new1.78 KB

Hi,

Creating a patch for this issue.

Please review the patch.

Thanks.

Pooja Ganjage’s picture

Status: Needs work » Needs review
solideogloria’s picture

Status: Needs review » Reviewed & tested by the community

#9 applies to dev and fixes it for me.

joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

retiredpro made their first commit to this issue’s fork.