Call to a member function def() on a non-object
При переносе старого сайта с хостинга на локальный сервер, при входе в админку выдаёт:
Fatal error: Call to a member function def() on a non-object in Z:\home\finmonster.org\www\docs\administrator\index.php on line 172
if ( $_VERSION->SITE == 1 && @$mosConfig_admin_expired === '1' ) {
$file = $mainframe->getPath( 'com_xml', 'com_users' );
$params &= new mosParameters( $my->params, $file, 'component' );
$now = time();
// expired page functionality handling
$expired = $params->def( 'expired', '' ); //172 line
$expired_time = $params->def( 'expired_time', '' );
// if now expired link set or expired time is more than half the admin session life set, simply load normal admin homepage
$checktime = ( $mosConfig_session_life_admin ? $mosConfig_session_life_admin : 1800 ) / 2;
if (!$expired || ( ( $now - $expired_time ) > $checktime ) ) {
$expired = 'index2.php';
}
// link must also be a Joomla link to stop malicious redirection
if ( strpos( $expired, 'index2.php?option=com_' ) !== 0 ) {
$expired = 'index2.php';
}
// clear any existing expired page data
$params->set( 'expired', '' );
$params->set( 'expired_time', '' );
// param handling
if (is_array( $params->toArray() )) {
$txt = array();
foreach ( $params->toArray() as $k=>$v) {
$txt[] = "$k=$v";
}
$saveparams = implode( "\n", $txt );
}
// save cleared expired page info to user data
$query = "UPDATE #__users"
. "\n SET params = " . $database->Quote( $saveparams )
. "\n WHERE id = " . (int) $my->id
. "\n AND username = " . $database->Quote( $my->username )
. "\n AND usertype = " . $database->Quote( $my->usertype )
;
$database->setQuery( $query );
$database->query();
}
Сайт написан на Joomla 1.0.15. Что делать