Uncaught Error

Call to a member function getHtml() on null

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

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

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

                                                                'USERNAME_VALUE' => ((isset($_POST['username']) && $_POST['username']) ? Output::getClean(Input::get('username')) : ''),
        'MINECRAFT_USERNAME' => $language->get('user', 'minecraft_username'),
        'EMAIL' => $language->get('user', 'email_address'),
        'EMAIL_VALUE' => ((isset($_POST['email']) && $_POST['email']) ? Output::getClean(Input::get('email')) : ''),
        'PASSWORD' => $language->get('user', 'password'),
        'CONFIRM_PASSWORD' => $language->get('user', 'confirm_password'),
        'I_AGREE' => $language->get('user', 'i_agree'),
        'AGREE_TO_TERMS' => str_replace('{x}', URL::build('/terms'), $language->get('user', 'agree_t_and_c')),
        'REGISTER' => $language->get('general', 'register'),
        'LOG_IN' => $language->get('general', 'sign_in'),
        'LOGIN_URL' => URL::build('/login'),
        'TOKEN' => Token::get(),
        'CREATE_AN_ACCOUNT' => $language->get('user', 'create_an_account'),
        'ALREADY_REGISTERED' => $language->get('general', 'already_registered'),
        'ERROR_TITLE' => $language->get('general', 'error'),
        'CUSTOM_FIELDS' => $custom_fields
    )
);

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

    $submitScript = CaptchaBase::getActiveProvider()->getJavascriptSubmit('form-register');
    if ($submitScript) {
        $template->addJSScript('
            $("#form-register").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, '/');