I’m new to this forum and new to yii. I had an application developed from on version 1 and I want to move it to 2 as most of the topic and material I find today is for version 2. I googled this fatal error with no luck. I hope someone can point me in the right direction:
PHP Fatal Error – yii\base\ErrorException
Call to a member function register() on a non-object
- in C:\inetpub\wwwroot\basic\views\layouts\tpl_header.php at line 11
234567891011121314151617181920<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo 'Title' ?></title>
<?php Yii::$app->bootstrap->register(); ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Simpson Moyo - Webapplicationthemes.com">
<?php
$baseUrl = Yii::$app->request->baseUrl.'/css/hebo';
$cs = Yii::$app->getClientScript();
Yii::$app->clientScript->registerCoreScript('jquery');
Yii::$app->clientScript->registerScript('helpers', '
baseUrl = '.CJSON::encode(Yii::$app->baseUrl).';
');
?>
<!-- the styles -->
<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl;?>/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl;?>/css/bootstrap-responsive.min.css">
<link rel='stylesheet' type='text/css' href='//fonts.googleapis.com/css?family=Pontano+Sans'>
<!--<link rel="stylesheet" type="text/css" href="<?php echo $baseUrl;?>/js/nivo-slider/themes/default/default.css" media="screen" />
- yii\base\ErrorHandler::handleFatalError()