Jump to content

Возникла проблема с компонентом магазин подарков


Pashok(one)
 Share

Recommended Posts

Здравствуйте,вот такая вот ошибка при создании темы (хук оплаты за создание темы)

Возникла ошибка :

Catchable fatal error: Argument 1 passed to app_shop_classes_shop::__construct() must be an instance of ipsRegistry, null given, called in /home/*/www/*.ru/forum/hooks/shop_t_pay_99cf33fdf76cfb5e30f8daf79541ca89.php on line 9 and defined in /home/*/www/*.ru/forum/3iuadminset/applications_addon/other/shop/sources/classes/shop.php on line 39

 

9 строка :

<?php
class shop_t_pay
{
public function handleData( $data )
   {
	if ( !ipsRegistry::isClassLoaded('shop') )
       {
           $classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('shop') . '/sources/classes/shop.php', 'app_shop_classes_shop', 'shop' );

      ipsRegistry::setClass( 'shop', new $classToLoad( $this->registry ) ); ////////это 9ая строка
       }

       return $this->registry->getClass('shop')->shop_t_pay_hook( $data );
}
}

 

39 строка :

public function __construct( ipsRegistry $registry )////Это 39 строка
{
	/* Make objects */
	$this->registry = $registry;
	$this->DB	    = $this->registry->DB();
	$this->settings =& $this->registry->fetchSettings();
	$this->request  =& $this->registry->fetchRequest();
	$this->lang	    = $this->registry->getClass('class_localization');
	$this->member   = $this->registry->member();
	$this->memberData =& $this->registry->member()->fetchMemberData();
	$this->cache	= $this->registry->cache();
	$this->caches   =& $this->registry->cache()->fetchCaches();

	if( IN_ACP )
       {
           /* Load the language File */
           $registry->class_localization->loadLanguageFile( array( 'admin_shop' ), 'shop' );
       }
	else
	{
		/* Load the language File */
           $registry->class_localization->loadLanguageFile( array( 'public_shop' ), 'shop' );
	}
}

Буду очень благодарен если кто-то поможет.

Раздела с помощью не нашёл.

Link to comment
Share on other sites

А компонент соответствует версии форума?

 

Перед

if ( !ipsRegistry::isClassLoaded('shop') )

 

Попробуйте добавить

$this->registry = ipsRegistry::instance();

  • Upvote 1
Link to comment
Share on other sites

А компонент соответствует версии форума?

 

Перед

if ( !ipsRegistry::isClassLoaded('shop') )

 

Попробуйте добавить

$this->registry = ipsRegistry::instance();

Огромное спасибо! помогло! Теперь не могли бы мы обсудить в лс то что я просил, конкретно интересует цена.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...