Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] Exception in user_templateLayout hook #1250

Closed
derhansen opened this issue Aug 26, 2024 · 0 comments
Closed

[BUG] Exception in user_templateLayout hook #1250

derhansen opened this issue Aug 26, 2024 · 0 comments

Comments

@derhansen
Copy link
Owner

When the user_templateLayout is executed, $config['flexParentDatabaseRow']['pid'] may be null, which results in a type error.

DERHANSEN\SfEventMgt\Hooks\TemplateLayouts::getTemplateLayoutsFromTsConfig(): Argument #1 ($pageUid) must be of type int, null given, called in /home/vendor/derhansen/sf_event_mgt/Classes/Hooks/TemplateLayouts.php on line 26

Ensure that there is a fallback for non existing pageUid

derhansen added a commit that referenced this issue Aug 27, 2024
This change ensures, that `$config['flexParentDatabaseRow']['pid']`
is available and adds a fallback to `0` when not. Additionally,
the resulting value is typecasted to int to prevent type mismatch
errors.

Refs #1250
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@derhansen and others