Skip to content

Varien Gd2: fix isset check#5605

Merged
sreichel merged 2 commits into
OpenMage:mainfrom
Hanmac:gd2IssetFix
May 22, 2026
Merged

Varien Gd2: fix isset check#5605
sreichel merged 2 commits into
OpenMage:mainfrom
Hanmac:gd2IssetFix

Conversation

@Hanmac
Copy link
Copy Markdown
Contributor

@Hanmac Hanmac commented May 22, 2026

Description (*)

cherry-pick isset check in Gd2

Related Pull Requests

Fixed Issues (if relevant)

  • fixes OpenMage/magento-lts#<issue_number>

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All automated tests passed successfully (all builds are green, SonarCloud checks are not required to merge)

@Hanmac Hanmac requested a review from sreichel May 22, 2026 12:37
@github-actions github-actions Bot added Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* phpstan labels May 22, 2026
@sreichel sreichel merged commit 13c0b6c into OpenMage:main May 22, 2026
20 checks passed
@sonarqubecloud
Copy link
Copy Markdown

@sreichel sreichel added the chore label May 22, 2026
@Hanmac Hanmac deleted the gd2IssetFix branch May 22, 2026 12:50
@sreichel sreichel requested a review from Copilot May 22, 2026 14:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates Varien_Image_Adapter_Gd2::save() to simplify redundant isset()/!isset() branches, addressing a PHPStan “isset.variable” warning and allowing removal of the corresponding baseline entry.

Changes:

  • Simplified the save() parameter-branching logic by removing conditions that are implied by earlier elseif branches.
  • Deleted the dedicated PHPStan baseline for the redundant isset() warning.
  • Removed the deleted baseline file from the PHPStan baseline loader.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lib/Varien/Image/Adapter/Gd2.php Simplifies elseif conditions in save() to avoid redundant isset() checks.
.phpstan.dist.baselines/isset.variable.php Removes the no-longer-needed PHPStan ignore entry for the fixed isset() warning.
.phpstan.dist.baselines/_loader.php Drops the include for the removed isset.variable.php baseline file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants