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

Undefined array key 1 inc/hacks.php on line 131 #130

Open
2 tasks done
YourMark opened this issue Jan 9, 2025 · 0 comments
Open
2 tasks done

Undefined array key 1 inc/hacks.php on line 131 #130

YourMark opened this issue Jan 9, 2025 · 0 comments
Assignees

Comments

@YourMark
Copy link

YourMark commented Jan 9, 2025

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. Install the plugin
  2. Add a comment block in a post template
  3. Check the site when not logged in.

Expected results

  1. Excpected not to see a warning

Actual results

  1. A warning is thrown.

Even though it should maybe only render for logged in admins, the core/comment-edit-link is rendered for everybody in the front-end. Albeit not displaying anything, there's still an empy <div> showing up.

Because the block is rendered, the code on line 128 in hacks.php passes
if ( isset( $block['blockName'] ) && $block['blockName'] === 'core/comment-edit-link' ) { but the preg_match on line 129 won't find a match resulting in a warning on line 131.

Screenshots, screen recording, code snippet

If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.

Technical info

Used versions

  • Device you are using:
  • Operating system:
  • PHP version:
  • WordPress version:
  • WordPress Theme:
  • Plugin version:
  • Relevant plugins in case of a bug:
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

No branches or pull requests

2 participants