Skip to content
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

Use typed access to request parameters #5267

Merged
merged 3 commits into from Apr 6, 2023

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented Apr 6, 2023

This was a big source of mixed datatypes in many places

Contributes to #4112

This was a big source of mixed datatypes in many places
@Alkarex Alkarex added the System care Everything related to the system care label Apr 6, 2023
@Alkarex Alkarex added this to the 1.22.0 milestone Apr 6, 2023
@@ -35,6 +42,7 @@ public static function params() {
* @param mixed $default default value, if no parameter is given
* @param bool $specialchars special characters
* @return mixed value of the parameter
* @deprecated use typed versions instead
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making the previous method deprecated.
Still used in one location: FreshRSS_entry_Controller->readAction()

@Alkarex Alkarex marked this pull request as draft April 6, 2023 00:48
@Alkarex Alkarex marked this pull request as ready for review April 6, 2023 00:53
@Alkarex
Copy link
Member Author

Alkarex commented Apr 6, 2023

@ColonelMoutarde would you feel like proofreading a bit here?

@Alkarex
Copy link
Member Author

Alkarex commented Apr 6, 2023

Let's merge to avoid too many PR conflicts

@Alkarex Alkarex merged commit 6c01e4e into FreshRSS:edge Apr 6, 2023
1 check passed
@Alkarex Alkarex deleted the typed-request-param branch April 6, 2023 22:13
Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Apr 13, 2023
@Alkarex Alkarex mentioned this pull request Apr 13, 2023
$shortcuts = Minz_Request::param('shortcuts');
if (false !== Minz_Request::param('load_default_shortcuts')) {
$shortcuts = Minz_Request::paramArray('shortcuts');
if (!Minz_Request::paramBoolean('load_default_shortcuts')) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Negation bug fixed in #5294

Alkarex added a commit that referenced this pull request Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
System care Everything related to the system care
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant