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

Console command Dev::Package::DocumentationGenerate handles PackageRequired statements erroneously #2427

Closed
stefanhaerter opened this issue Aug 3, 2023 · 2 comments
Assignees
Labels
bug Something isn't working as intended
Milestone

Comments

@stefanhaerter
Copy link
Contributor

I came across a (presumably) typo in

my $PackageRequired;
if ( $Param{Structure}{PackageRequired} ) {
for my $Package ( $Param{Structure}{PackageRequired}->@* ) {
$PackageRequired .= "$_{Content} $_{Version}\n";
}
chomp $PackageRequired;
}

Firstly, I got a warning in my log:

Use of uninitialized value in concatenation (.) or string at /opt/otobo/Kernel/System/Console/Command/Dev/Package/DocumentationGenerate.pm line 198.

According to debug prints, $_ is undefined, and even if it would be defined, I would expect it to be a reference to a hash, not a hash itself. The loop variable $Package is a hash reference and contains the wanted data.

Personally, I would prefer to include the fix in rel-10_1 because the DocumentationGenerate command was firstly added to this version, but I would also understand if the decision would be to only fix it in rel-11_0.

@stefanhaerter stefanhaerter added the bug Something isn't working as intended label Aug 3, 2023
@stefanhaerter stefanhaerter added this to the OTOBO 10.1 milestone Aug 3, 2023
@stefanhaerter stefanhaerter self-assigned this Aug 3, 2023
bschmalhofer added a commit that referenced this issue Aug 3, 2023
…rate

Issue #2427: Use correct loop variable in PackageRequired handling.
@bschmalhofer
Copy link
Contributor

I aggree that this should be included in rel-10_1.
The PR is merged.

@stefanhaerter
Copy link
Contributor Author

Thank you =)

Closed with merged #2428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants