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(php) : Fix null pointer issue in createClearingDecisions() #2658

Merged
merged 2 commits into from
Dec 23, 2023

Conversation

Kgitman
Copy link
Contributor

@Kgitman Kgitman commented Dec 19, 2023

Description

This pull request addresses a potential null pointer issue #2656 in the createClearingDecisions() method within DecisionImporterDataCreator.php
Closes #2656.

Changes

  • Added null pointer that check for the variable $newCeId before processing within the foreach loop.
  • Inserted if ($newCeId === null) { continue; } to ensure the loop skips operations if $newCeId is null.

How to test

  • Tested the updated code by simulating scenarios where $newCeId could be null.
  • Verified that the loop correctly skips operations and doesn't cause any errors.

/cc @GMishx

Signed-off-by: Kgitman <95560077+Kgitman@users.noreply.github.com>
Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

Please update the commit message according to our contributing guidelines.

@GMishx GMishx added this to the 4.4.0 milestone Dec 20, 2023
@Kgitman
Copy link
Contributor Author

Kgitman commented Dec 21, 2023

Ok,
So i have to just edit the commit message according to your contributing guidelines?
No need to change the code?

@GMishx
Copy link
Member

GMishx commented Dec 21, 2023

Yes, code changes are good. Please change just the commit message.

@Kgitman
Copy link
Contributor Author

Kgitman commented Dec 22, 2023

Done?

@GMishx
Copy link
Member

GMishx commented Dec 22, 2023

I see no difference @Kgitman

@Kgitman Kgitman changed the title Update DecisionImporterDataCreator.php Fix(php) : Fix null pointer issue in createClearingDecisions() Dec 22, 2023
@Kgitman
Copy link
Contributor Author

Kgitman commented Dec 22, 2023

Sorry for that i changed the description , I edited the commit message please review.
@GMishx

@GMishx
Copy link
Member

GMishx commented Dec 22, 2023

Oh, I see. But I meant the actual commit message, not the PR title or description. Since it is the once which will end up in the commit history.

Signed-off-by: Kgitman <95560077+Kgitman@users.noreply.github.com>
@Kgitman
Copy link
Contributor Author

Kgitman commented Dec 23, 2023

Is this ok? Please review.
@GMishx

Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

LGTM

@GMishx
Copy link
Member

GMishx commented Dec 23, 2023

Is this ok? Please review. @GMishx

Not exactly, was expecting to have only 1 commit at the end (using git commit --amend). But I guess I can squash the commits while merging.

@GMishx GMishx merged commit 01c073c into fossology:master Dec 23, 2023
13 checks passed
Ibrahim-Muhammad13 pushed a commit to Ibrahim-Muhammad13/fossology that referenced this pull request Feb 20, 2024
…logy#2658)

fix(php) : Fix null pointer issue in createClearingDecisions()

Signed-off-by: Kgitman <95560077+Kgitman@users.noreply.github.com>

Reviewed-by: mishra.gaurav@siemens.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception during fossology import
2 participants