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 issue when page has no components #993

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

mjauvin
Copy link
Member

@mjauvin mjauvin commented Oct 13, 2023

This bug triggered for a page that used the blogPost component and its categoryPage referenced a page that had no components assigned.

An error got triggered on line 329, trying to access a non-existent index in the $objectComponentMap array;

if (array_key_exists($componentName, $objectComponentMap[$objectCode])) {

This PR makes sure the array is initialized.

@mjauvin mjauvin added this to the v1.2.4 milestone Oct 13, 2023
@mjauvin mjauvin requested a review from LukeTowers October 13, 2023 20:26
@mjauvin mjauvin self-assigned this Oct 13, 2023
@LukeTowers LukeTowers added Status: Completed maintenance PRs that fix bugs, are translation changes or make only minor changes labels Oct 14, 2023
@LukeTowers LukeTowers changed the title handle case where page has no components Fix issue when page has no components Oct 14, 2023
@LukeTowers LukeTowers merged commit 10b55d8 into develop Oct 14, 2023
12 checks passed
@LukeTowers LukeTowers deleted the fix-getcomponentproperties branch October 14, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PRs that fix bugs, are translation changes or make only minor changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants