Issue #3503041: Fix missing theme_hook_original in preprocess function
Problem/Motivation
When rendering certain views, the preprocess function causes errors because the $variables array is not properly initialized:
Error message:
Error: Undefined array key "theme_hook_original"
Steps to reproduce
- Enable the "Cookies Addons Views" module.
- Create a view with custom templates.
- Load the page and check the PHP error log.
Proposed resolution
Instead of setting $variables = [];, we initialize it with $variables = ['theme_hook_original' => '']; to ensure the key always exists.
Remaining tasks
- Code review
- Manual testing
User interface changes: None.
API changes: None.
Data model changes: None.