Skip to content

Conversation

@nikkifurls
Copy link
Contributor

Summary

Fixes #44

As titled.

Notes for reviewers

None.

Changelog entries

  • Added:
  • Changed:
  • Deprecated:
  • Removed:
  • Fixed: Add an ! empty() check to prevent PHP warning: Undefined array key "linkDestination" in class-image.php.
  • Security:

Issue(s)

#44

@nikkifurls nikkifurls marked this pull request as ready for review November 17, 2025 21:53
Copilot AI review requested due to automatic review settings November 17, 2025 21:53
Copilot finished reviewing on behalf of nikkifurls November 17, 2025 21:54
Copy link

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 PR fixes a PHP warning caused by accessing an undefined array key linkDestination in the Image block class by adding an ! empty() check before accessing the key.

Key Changes:

  • Added a conditional check using ! empty() to verify linkDestination exists before comparing its value to 'none'
  • Reformatted the conditional logic across multiple lines for improved readability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nikkifurls nikkifurls force-pushed the fix/issue-44/php-warning-linkdestination-check branch from e902957 to adc1375 Compare November 17, 2025 21:57
Comment on lines +73 to +74
- name: Install Subversion
run: sudo apt-get update && sudo apt-get install -y subversion
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PHPUnit step was failing with svn: command not found

@nikkifurls nikkifurls merged commit 00c9050 into main Nov 18, 2025
5 checks passed
@nikkifurls nikkifurls deleted the fix/issue-44/php-warning-linkdestination-check branch November 18, 2025 19:24
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.

PHP Warning: Undefined array key "linkDestination" in class-image.php

3 participants