Uncaught Error

Call to a member function getHtml() on null

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

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

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

                                                                        $success = $language->get('general', 'contact_message_sent');
            } else {
                $errors = $validation->errors();
            }

        } else
            // Invalid recaptcha
        $errors = $language->get('user', 'invalid_recaptcha');
    } else {
        // TODO: This seems to never go down
      $errors = str_replace('{x}', round((date('U') - strtotime('- 1 hour')) / 60), $language->get('general', 'contact_message_limit'));
    }
  } else {
    // Invalid token
    $errors = $language->get('general', 'invalid_token');
  }
}

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

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

if(isset($errors))
	$smarty->assign('ERRORS', $errors);

if(isset($erroremail))
	$smarty->assign('ERROR_EMAIL', $erroremail);

if(isset($errorcontent))

                                                    
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, '/');