Fatal error: Call to undefined method Exception::get() in filename & line no

3.2k Views Asked by At

I am running into this fatal error, and have no idea why it is generated. Any help will be very appreciated. This website is working online, but once I download it ot my system, it shows this error.

The Error Message is:

Fatal error: Call to undefined method Exception::get() in C:\wamp\www\motor_racing_server\templates\yoo_shelf\error.php on line 20

For Further information:

I have already updated the configuration.php file variables. below is the list of files changed.

public $dbtype = 'mysql';
public $host = 'localhost';
public $user = 'root';
public $password = '';
public $db = 'motor_racing_joomla';
public $log_path = 'C:\\wamp\\www\\NEW_JOOMLA\\logs';   
public $tmp_path = 'C:\\wamp\\www\\NEW_JOOMLA\\tmp';

P.S The database name is correct, i have already checked it.

The error.php code is below

<?php
/**
* @package   yoo_shelf
* @author    YOOtheme http://www.yootheme.com
* @copyright Copyright (C) YOOtheme GmbH
* @license   http://www.gnu.org/licenses/gpl.html GNU/GPL
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

  // include config 
include_once(dirname(__FILE__).'/config.php');

// get warp 
$warp = Warp::getInstance();

// set messages
$title   = $this->title; // line 19
$error   = $this->error->get('code'); // line 20
$message = $this->error->get('message'); // line 21

// set 404 messages
if ($error == '404') {
$title   = JText::_('TPL_WARP_404_PAGE_TITLE');
$message = JText::sprintf('TPL_WARP_404_PAGE_MESSAGE', JURI::root(false), $warp['config']->get('site_name'));
}

// render error layout
echo $warp['template']->render('error', compact('title', 'error', 'message'));

I tried to remove the line 20, the code generate the same error for line 21. And after commenting out both line 20, and line 21, I got an error "Error 500".

1

There are 1 best solutions below

0
On

I have fixed the problem, in two steps.

I re-download all the files from the server, and that fix the problem. I still have no Idea what was missing.

Secondly, I configure new joomla application on my system, and then compare the two configuartion files (from server site and one configured on localhost), and change the variables excep the one related to database.