Skip to content

Fix many issues regarding $errors variable and @ character#894

Merged
svivian merged 1 commit intoq2a:bugfixfrom
pupi1985:patch-141
May 3, 2021
Merged

Fix many issues regarding $errors variable and @ character#894
svivian merged 1 commit intoq2a:bugfixfrom
pupi1985:patch-141

Conversation

@pupi1985
Copy link
Copy Markdown
Contributor

@pupi1985 pupi1985 commented May 2, 2021

I've removed many usages of the @ sign and initialized the @errors variable in all pages I noticed it was used.

I have not removed all @ signs, but this should get the code one step closer to that.

This PR should also fix #888.

@svivian svivian merged commit 2cf739b into q2a:bugfix May 3, 2021
@svivian
Copy link
Copy Markdown
Collaborator

svivian commented May 3, 2021

Thanks for this. We ought to move to PHP 7 minimum soon, so we can write $errors['key'] ?? null instead of all the isset() calls. I've done that in other projects and it makes things a lot neater!

@pupi1985
Copy link
Copy Markdown
Contributor Author

pupi1985 commented May 3, 2021

I know, I'm looking forward for that to happen :) The PHP 8 release can be used as an excuse for this dependency update.

The good thing of having the wordy isset()s in the code (compared to the @ sign) is that IDE's should be able to detect the "code smell" and hint the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants