Skip to content

Commit

Permalink
fix(installer): Trying to access array offset on null in dxpr_cms_ins…
Browse files Browse the repository at this point in the history
…taller_theme_registry_alter
  • Loading branch information
Jurriaan Roelofs committed Jan 22, 2025
1 parent d095427 commit c459b50
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,12 @@ function dxpr_cms_installer_rebuild_theme(): void {
*/
function dxpr_cms_installer_theme_registry_alter(array &$hooks): void {
global $install_state;
$installer_path = $install_state['profiles']['dxpr_cms_installer']->getPath();

$hooks['install_page']['path'] = $installer_path . '/templates';

// Check if install_state and required keys exist before accessing
if (!empty($install_state['profiles']['dxpr_cms_installer'])) {
$installer_path = $install_state['profiles']['dxpr_cms_installer']->getPath();
$hooks['install_page']['path'] = $installer_path . '/templates';
}
}

/**
Expand Down

0 comments on commit c459b50

Please sign in to comment.