-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed: Simpletest FilterEditorLinkValidateTestCase silently broken on PHP 5.3 #5215
Comments
Subtle, but sort of obvious - the trailing comma breaks it. It's inside a function, not an array definition, so PHP versions before 7.3 choke on it.
|
We seem to be inconsistently using either multiple string parameters, or an array within
In the case of multiple modules, people will be splitting them in separate lines, for readability. So you'll have this, which I think should work w/o any problems: parent::setUp(
array(
'module1',
'module2',
'module3',
)
); But also this, which will break things: parent::setUp(
'module1',
'module2',
'module3',
); Since people may be copy/pasting code and then tweaking it, I'm wondering whether it would be a good idea to establish a coding standard where we require the array variant when multiple modules (less chances to break things). |
Thanks folks! @klonos the different arguments for I went ahead and merged backdrop/backdrop#3739 into 1.x and 1.19.x. Thanks! |
It might have been broken for a while, but nobody realized because it doesn't produce an actual test failure.
Only on PHP 5.3:
When reading "syntax error" in 5.3 my first thought is the short array syntax, but there doesn't seem to be any (we fixed one recently).
Here's an example: https://github.com/backdrop/backdrop/runs/3585091100?check_suite_focus=true#step:9:287
Note: no test failure.
The text was updated successfully, but these errors were encountered: