(Translated by https://www.hiragana.jp/)
🐛 fix optional parameter warning by wiztigers · Pull Request #153 · HeuristNetwork/heurist · GitHub
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

🐛 fix optional parameter warning #153

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Conversation

wiztigers
Copy link

On a fresh Heurist install, database cannot be created due to a PHP deprecation warning.
This blocks database creation on a fresh install of Heurist.

See screenshot below:
db_creation_blocked

(This pull request stems from this issue huma-num/heurist#8)

This blocked database creation on a fresh install of Heurist.
@wiztigers
Copy link
Author

wiztigers commented Oct 5, 2022

For info, this parse_query function default parameter doesn't seem to be used anywhere in the code ; that's why I took the liberty to remove it (instead of for example providing default values for the last parameters):

$ grep -ri parse_query *
hsapi/dbaccess/compose_sql.php:    $query = parse_query($search_domain, @$params['q'], @$params['s'], @$params['parentquery'], $currUserID);
hsapi/dbaccess/compose_sql.php:function parse_query($search_domain, $text, $sort_order, $parentquery, $currUserID) {
hsapi/dbaccess/compose_sql_new.php:                $query = parse_query($top_query->search_domain, urldecode($this->value), null, null, $top_query->currUserID);

@wiztigers
Copy link
Author

For info (bis), as soon as this pull request is merged I'll have to update Heurist Docker image, as the image creation process currenty fixes this (so I'll have to remove the patch).

@sonarcloud
Copy link

sonarcloud bot commented Oct 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@osmakov osmakov merged commit 494c8cb into HeuristNetwork:h6dev Oct 20, 2022
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