Skip to content

Fix undefined array key 1 error in sectionsWithAppBlock #448

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thesunilyadav
Copy link

@thesunilyadav thesunilyadav commented Jul 31, 2025

Issue: #443

Problem: The sectionsWithAppBlock method throws an "Undefined array key 1" error when preg_match fails to find a schema, causing downstream errors like "Missing auth url".

Fix: Added a check to ensure preg_match finds a match before accessing $matches[1]. If no schema exists, $acceptsAppBlock remains false, preventing the error.

Testing: Manually verified with schema-less assets; no errors occur, and sections are correctly filtered.

Notes: Please review and let me know if additional tests or changes are needed!

@Kyon147
Copy link
Owner

Kyon147 commented Aug 1, 2025

@thesunilyadav just some lint issues to fix, rest looks good

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.

2 participants