Hello, since PHP 7.4 the curly brace syntax for accessing array elements is deprecated and will be removed in PHP 8+.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3108958-9.patch | 1.78 KB | Pooja Ganjage |
| #2 | drupalmoduleupgrader-curly-braces-3108958-2-D8.patch | 1.96 KB | peterkokot |
Issue fork drupalmoduleupgrader-3108958
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
Comment #2
peterkokot commentedComment #3
solideogloria commentedQuestion, why do some of the changes use
substrand some use brackets?Comment #4
jcnventuraI think because the ones that use
substrmight not be strings already, and as such need to be cast tostringduring thesubstrcall. However, it would be good to have it better investigated.Comment #5
solideogloria commentedRight, 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 havesubstr()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
Comment #6
ugintl commentedPatch not applying on latest dev
Comment #7
solideogloria commentedComment #8
solideogloria commentedComment #9
Pooja Ganjage commentedHi,
Creating a patch for this issue.
Please review the patch.
Thanks.
Comment #10
Pooja Ganjage commentedComment #11
solideogloria commented#9 applies to dev and fixes it for me.
Comment #13
joseph.olstad