如何修复警告:Prestashop 1.7中的Hook :: exec错误声明?

问题描述 投票:-2回答:1

我希望你很好我需要你帮助解决这个问题,这个问题从现在开始几天仍然存在。说实话,我不太了解。许多thnaks为您的帮助。

Warning: Declaration of Hook::exec($hook_name, $hook_args = Array, $id_module = NULL, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = NULL) should be compatible with HookCore::exec($hook_name, $hook_args = Array, $id_module = NULL, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = NULL, $chain = false)

Symfony\Component\Debug\Exception\ContextErrorException:
Warning: Declaration of Hook::exec($hook_name, $hook_args = Array, $id_module = NULL, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = NULL) should be compatible with HookCore::exec($hook_name, $hook_args = Array, $id_module = NULL, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = NULL, $chain = false)

  at override/classes/Hook.php:84
  at Symfony\Component\Debug\ErrorHandler->handleError(2, 'Declaration of Hook::exec($hook_name, $hook_args = Array, $id_module = NULL, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = NULL) should be compatible with HookCore::exec($hook_name, $hook_args = Array, $id_module = NULL, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = NULL, $chain = false)', '/home/u161749200/domains/eas.ci/public_html/override/classes/Hook.php', 84, array('className' => 'Hook', 'classDir' => '/home/u161749200/domains/eas.ci/public_html/'))
     (classes/PrestaShopAutoload.php:152)
  at require_once()
     (classes/PrestaShopAutoload.php:152)
  at PrestaShopAutoload->load('Hook')
  at call_user_func(array(object(PrestaShopAutoload), 'load'), 'Hook')
     (vendor/symfony/symfony/src/Symfony/Component/Debug/DebugClassLoader.php:153)
  at Symfony\Component\Debug\DebugClassLoader->loadClass('Hook')
  at spl_autoload_call('Hook')
     (classes/Dispatcher.php:483)
  at DispatcherCore->loadRoutes()
     (classes/Dispatcher.php:229)
  at DispatcherCore->__construct()
     (classes/Dispatcher.php:194)
  at DispatcherCore::getInstance()
     (codazon/index.php:99)
php content-management-system prestashop-1.6 symphony-cms
1个回答
0
投票

正如错误消息所述,函数声明应该是兼容的。 HookCore::exec最后包括$chain = falseHook::exec没有。

似乎他们在某些时候更改了功能签名,但可能并非所有插件都已更新以匹配。确保所有插件都是最新的。如果这不能解决它,可以一次禁用一个,看看你是否能找到导致问题的那个,并与提供商联系,如果这是你不能没有的东西。

© www.soinside.com 2019 - 2024. All rights reserved.