Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 475 Просмотров
*

a159cm

  • Захожу иногда
  • 71
  • 0 / 0
Ошибка php 7.3
« : 06.03.2021, 10:02:02 »
Добрый день, народ, подскажите как вылечить?

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgSystemFeedGator has a deprecated constructor in /var/www/s175635/data/www/prosalsk.ru/plugins/system/feedgator_system/feedgator_system.php on line 15

Код
<?php
/**
 * FeedGator System (Automator) Plugin
 * @version 3.0a1
 * @author Matt Faulds
 * @license GPL 2
 */

// Check to ensure this file is included in Joomla!
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.plugin.plugin' );
jimport( 'joomla.registry.registry' );

class plgSystemFeedGator extends JPlugin
{
protected $interval = 300;

function plgSystemFeedGator( &$subject, $params )
{
parent::__construct( $subject, $params );

$this->plugin = JPluginHelper::getPlugin('system', 'feedgator_system');
$this->params = new JRegistry($this->plugin->params);

$this->interval = (int) ($this->params->get('interval', 5)*60);

// correct value if value is under the minimum
if ($this->interval < 300) { $this->interval = 300; }
}

function onAfterRoute()
{
$app = JFactory::getApplication();

//FG Automator import
if ($app->isSite() AND $this->params->get('fgautomator',0)) {
$now = JFactory::getDate();
$now = $now->toUnix();

if($last = $this->params->get('last_import')) {
$diff = $now - $last;
} else {
$diff = $this->interval+1;
}

if ($diff > $this->interval) {

$jlang = JFactory::getLanguage();
// Back-end translation
$jlang->load('com_feedgator', JPATH_ADMINISTRATOR, 'en-GB', true);
$jlang->load('com_feedgator', JPATH_ADMINISTRATOR, $jlang->getDefault(), true);
$jlang->load('com_feedgator', JPATH_ADMINISTRATOR, null, true);

require_once(JPATH_ADMINISTRATOR.'/components/com_feedgator/controller.php');
require_once(JPATH_ADMINISTRATOR.'/components/com_feedgator/factory.feedgator.php');
require_once(JPATH_ADMINISTRATOR.'/components/com_feedgator/helpers/feedgator.helper.php');
require_once(JPATH_ADMINISTRATOR.'/components/com_feedgator/helpers/feedgator.utility.php');
if(file_exists(JPATH_ROOT.'/plugins/system/addkeywords.php')) {
require_once(JPATH_ROOT.'/plugins/system/addkeywords.php' );
}
FeedgatorUtility::profiling('Start pseudo-cron');

define('SPIE_CACHE_AGE', 60*10);

require_once(JPATH_ADMINISTRATOR.'/components/com_feedgator/inc/simplepie131.php');
require_once(JPATH_ADMINISTRATOR.'/components/com_feedgator/inc/simplepie/overrides.php');
FeedgatorUtility::profiling('Loaded SimplePie');

JRequest::setVar('task','fgautomator','get');
JRequest::setVar(JSession::getFormToken(),'1','get');

$config = array('base_path'=>JPATH_ADMINISTRATOR.'/components/com_feedgator');
$controller = new FeedgatorController($config);
if($result = $controller->import('all')) {
jimport( 'joomla.registry.format' );
$db = JFactory::getDbo();
$this->params->set('last_import',$now);
$handler = JRegistryFormat::getInstance('json');
$params = new JObject();
$params->set('interval',$this->params->get('interval',5));
$params->set('last_import',$now);
$params = $handler->objectToString($params,array());

$query = 'UPDATE #__extensions'.
' SET params='.$db->Quote($params).
' WHERE element = '.$db->Quote('plg_sys_feedgator').
' AND folder = '.$db->Quote('system').
' AND enabled >= 1'.
' AND type ='.$db->Quote('plugin').
' AND state >= 0';
$db->setQuery($query);
$db->query();
}
FeedgatorUtility::profiling('End');
}
}
}
}
« Последнее редактирование: 06.03.2021, 11:04:15 от a159cm »
*

draff

  • Гуру
  • 5803
  • 434 / 7
  • ищу работу
Re: Ошибка php 7.4
« Ответ #1 : 06.03.2021, 10:57:40 »
function plgSystemFeedGator( &$subject, $params ) заменить на
Код
function __construct( &$subject, $params )
*

a159cm

  • Захожу иногда
  • 71
  • 0 / 0
Re: Ошибка php 7.4
« Ответ #2 : 06.03.2021, 11:03:49 »
function plgSystemFeedGator( &$subject, $params ) заменить на
Код
function __construct( &$subject, $params )

заменил ошибки включены но теперь пишет просто Call to a member function item() on null
*

a159cm

  • Захожу иногда
  • 71
  • 0 / 0
Re: Ошибка php 7.3
« Ответ #3 : 06.03.2021, 11:04:34 »
Извиняюсь стоит php 7.3
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Ошибка 0 Call to undefined function GuzzleHttp\choose_handler()

Автор Alllex

Ответов: 0
Просмотров: 78
Последний ответ 15.03.2024, 21:03:09
от Alllex
Ошибка version_compare(): Argument #3 ($operator)

Автор Шмайсер

Ответов: 1
Просмотров: 394
Последний ответ 07.11.2023, 20:44:21
от fsv
reCapcha во всплывающем окне - "Ошибка защиты от спама"

Автор Dannik

Ответов: 12
Просмотров: 1818
Последний ответ 14.09.2023, 18:59:24
от all_zer
Ошибка 1054 Unknown column 'created_by' in 'field list' VirtueMart

Автор Evgen Kulibin

Ответов: 3
Просмотров: 772
Последний ответ 26.02.2023, 01:56:42
от lakshmi
Ошибка "0 Некорректный контроллер: имя='user', формат=''"

Автор zeus07

Ответов: 14
Просмотров: 2245
Последний ответ 20.02.2023, 11:47:20
от wiz.alex