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

Issue 93 $acc parameter no longer optional #94

Merged

Conversation

dsenalik
Copy link

@dsenalik dsenalik commented Jan 7, 2023

Simple fix for the PHP8 issue described in Issue #93

Make the $acc parameter into a required parameter, move the assignment of null string into the code. Though I suspect this will never be needed, it will always have a value. But this way there is no possibility of a functional change.

@dsenalik dsenalik mentioned this pull request Jan 7, 2023
Copy link
Member

@laceysanderson laceysanderson left a comment

Choose a reason for hiding this comment

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

Perfect -Thanks!

@laceysanderson laceysanderson merged commit 10a94fb into tripal:7.x-1.x Jan 7, 2023
@dsenalik dsenalik deleted the 93-tv3-php8-deprecation-warnings branch January 7, 2023 18:04
@smriti-135
Copy link

Hello. I am facing a lot of "deprecated" errors and the above mentioned is the latest. But instead of one variable in one line, I am getting as below in the home login page (goes away when I login)

Deprecated: Optional parameter $acc declared before required parameter $hit_name is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal_blast/api/blast_ui.api.inc on line 535

Deprecated: Optional parameter $form_state declared before required parameter $mode is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/tripal_bulk_loader/includes/tripal_bulk_loader.admin.templates.inc on line 23

Deprecated: Optional parameter $job_id declared before required parameter $node_type is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_core/api/tripal_core.chado_nodes.api.inc on line 1082

Deprecated: Optional parameter $input declared before required parameter $form_state is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_core/includes/tripal_core.form_elements.inc on line 104

Deprecated: Optional parameter $input declared before required parameter $form_state is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_core/includes/tripal_core.form_elements.inc on line 202

Deprecated: Optional parameter $analysis_id declared before required parameter $property is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 15

Deprecated: Optional parameter $feature_id declared before required parameter $property is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 15

Deprecated: Optional parameter $analysisfeature_id declared before required parameter $property is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 15

Deprecated: Optional parameter $analysis_id declared before required parameter $value is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 63

Deprecated: Optional parameter $feature_id declared before required parameter $value is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 63

Deprecated: Optional parameter $analysisfeature_id declared before required parameter $value is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 63

Deprecated: Optional parameter $analysis_id declared before required parameter $value is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 116

Deprecated: Optional parameter $feature_id declared before required parameter $value is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 116

Deprecated: Optional parameter $analysisfeature_id declared before required parameter $value is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 116

Deprecated: Optional parameter $analysis_id declared before required parameter $property is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 200

Deprecated: Optional parameter $feature_id declared before required parameter $property is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 200

Deprecated: Optional parameter $analysisfeature_id declared before required parameter $property is implicitly treated as a required parameter in /var/www/html/teak-wood-genes-drupal7/sites/all/modules/tripal/legacy/tripal_feature/api/tripal_feature.DEPRECATED.inc on line 200

How do I solve this?
blast_ui.api.inc.txt

@laceysanderson
Copy link
Member

You can fix this by

  1. making a fork of this repository
  2. Making the code changes in that forked version as shown in the example in this PR. Specifically, make the variable required in the function definition: $acc = '' became $acc and then within the function set the default that used to be set in the function header.
  3. To test you clone your forked version into your site instead of the official version.
  4. Once it's working completely, you can submit back the fixes as a PR so that I can merge them into the official version.

Hope that helps!

@dsenalik
Copy link
Author

I am thinking you don't have the current version of Tripal 3. For example, the second error above was fixed last July
tripal/tripal#1574
I think you need to update to the latest Tripal 3 version

@smriti-135
Copy link

I am using v 3.100 which was shown as the latest version...

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.

None yet

3 participants