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: uninitialized value #6997

Merged
merged 1 commit into from
Jul 4, 2022
Merged

fix: uninitialized value #6997

merged 1 commit into from
Jul 4, 2022

Conversation

dipietroR
Copy link
Contributor

@dipietroR dipietroR commented Jul 1, 2022

When clicking on the Advanced Search button, two warnings would appear:

[Fri Jul  1 16:34:41 2022] -e: Use of uninitialized value $title in substitution (s///) at /opt/product-opener/lib/ProductOpener/Display.pm line 6825.
[Fri Jul  1 16:34:41 2022] -e: Use of uninitialized value $title in substitution (s///) at /opt/product-opener/lib/ProductOpener/Display.pm line 6827.

This was because $title was empty, so I put the lines that were causing the error:

$title =~ s/<SITE>/$site/g;
$title =~ s/<([^>]*)>//g;

In the conditional below them:

if (defined $title) {

@dipietroR dipietroR requested a review from a team as a code owner July 1, 2022 17:19
@sonarcloud
Copy link

sonarcloud bot commented Jul 1, 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

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

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

Looks good, thank you!

@stephanegigandet stephanegigandet merged commit 28bcc4d into main Jul 4, 2022
@stephanegigandet stephanegigandet deleted the uninitialized-value branch July 4, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants