Uncaught Error

Call to a member function getHtml() on null

(File: /var/www/Nameless/modules/Core/pages/login.php)

https://firemods.net/index.php?route=/login/

File: /var/www/Nameless/modules/Core/pages/login.php

                                                        	'FORGOT_PASSWORD' => $language->get('user', 'forgot_password'),
	'FORM_TOKEN' => Token::get(),
	'SIGN_IN' => $language->get('general', 'sign_in'),
	'REGISTER_URL' => URL::build('/register'),
	'REGISTER' => $language->get('general', 'register'),
	'ERROR_TITLE' => $language->get('general', 'error'),
	'ERROR' => (isset($return_error) ? $return_error : array()),
	'NOT_REGISTERED_YET' => $language->get('general', 'not_registered_yet')
));

if (isset($return_error)) {
	$smarty->assign('SESSION_FLASH', $return_error);
} else {
	$smarty->assign('SESSION_FLASH', '');
}

if (Session::exists('login_success'))
	$smarty->assign('SUCCESS', Session::flash('login_success'));

if ($captcha) {
    $smarty->assign('CAPTCHA', CaptchaBase::getActiveProvider()->getHtml());
    $template->addJSFiles(array(CaptchaBase::getActiveProvider()->getJavascriptSource() => array()));

    $submitScript = CaptchaBase::getActiveProvider()->getJavascriptSubmit('form-login');
    if ($submitScript) {
        $template->addJSScript('
            $("#form-login").submit(function(e) {
                e.preventDefault();
                ' . $submitScript . '
            });
        ');
    }
}

// Load modules + template
Module::loadPage($user, $pages, $cache, $smarty, array($navigation, $cc_nav, $mod_nav), $widgets, $template);

$page_load = microtime(true) - $start;
define('PAGE_LOAD_TIME', str_replace('{x}', round($page_load, 3), $language->get('general', 'page_loaded_in')));

$template->onPageLoad();

                                                    
File: /var/www/Nameless/index.php

                                                                // Homepage
        $pages->setActivePage($pages->getPageByURL('/'));
        require(ROOT_PATH . '/modules/Core/pages/index.php');
    }

} else {
    $route = rtrim(strtok($_GET['route'], '?'), '/');

    // Check modules
    $modules = $pages->returnPages();

    // Include the page
    if (array_key_exists($route, $modules)) {
        $pages->setActivePage($modules[$route]);
        if (!isset($modules[$route]['custom'])) {
            $path = join(DIRECTORY_SEPARATOR, array(ROOT_PATH, 'modules', $modules[$route]['module'], $modules[$route]['file']));

            if (!file_exists($path)) {
                require(ROOT_PATH . '/404.php');
            } else { 
                require($path);
            }
            
            die();
        } else {
            require(join(DIRECTORY_SEPARATOR, array(ROOT_PATH, 'modules', 'Core', 'pages', 'custom.php')));
            die();
        }
    } else {
        // Use recursion to check - might have URL parameters in path
        $path_array = explode('/', $route);

        for ($i = count($path_array) - 2; $i > 0; $i--) {

            $new_path = '/';
            for($n = 1; $n <= $i; $n++){
                $new_path .= $path_array[$n] . '/';
            }

            $new_path = rtrim($new_path, '/');