- Posts: 5
- Thank you received: 0
Warning after update to 2.0
- TInkyWinky
-
Topic Author
- Offline
Less
More
8 years 11 months ago #281245
by TInkyWinky
Warning after update to 2.0 was created by TInkyWinky
-- HikaShop version -- : 3.2.1
-- HikaMarket version -- : 2.0
-- Joomla version -- : 3.8.1
-- PHP version -- : 7
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Warning: Parameter 1 to plgHikamarketVendorlocationfilter::onBeforeVendorListingDisplay() expected to be a reference, value given in P:\Programs\XAMPP\htdocs\globaltest\libraries\joomla\event\event.php on line 70
Hi all,
it's not a critical bug, it's just a new warning that came up after the upgrade to HikaMarket 2.0 and I wanted you to know.
It's within the vendorlocationfilter Plugin. HikaShop Plugin has no warnings at all.
Regards,
Fabio
-- HikaMarket version -- : 2.0
-- Joomla version -- : 3.8.1
-- PHP version -- : 7
-- Browser(s) name and version -- : Chrome
-- Error-message(debug-mod must be tuned on) -- : Warning: Parameter 1 to plgHikamarketVendorlocationfilter::onBeforeVendorListingDisplay() expected to be a reference, value given in P:\Programs\XAMPP\htdocs\globaltest\libraries\joomla\event\event.php on line 70
Hi all,
it's not a critical bug, it's just a new warning that came up after the upgrade to HikaMarket 2.0 and I wanted you to know.
It's within the vendorlocationfilter Plugin. HikaShop Plugin has no warnings at all.
Regards,
Fabio
Please Log in or Create an account to join the conversation.
8 years 11 months ago #281252
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Warning after update to 2.0
Hello,
I'm sorry but the function in the plugin is
And the trigger is called in one single file and its code is
So both are using a reference for the first parameter.
I don't know if you have custom code but I cannot see the issue you're describing.
Regards,
I'm sorry but the function in the plugin is
Code:
public function onBeforeVendorListingDisplay(&$view, &$params) {
Code:
JFactory::getApplication()->triggerEvent('onBeforeVendorListingDisplay', array(&$this, &$trigger_params));
I don't know if you have custom code but I cannot see the issue you're describing.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
- TInkyWinky
-
Topic Author
- Offline
Less
More
- Posts: 5
- Thank you received: 0
8 years 11 months ago #281266
by TInkyWinky
Replied by TInkyWinky on topic Warning after update to 2.0
Hello Jerome, thanks again for your quick reply.
You're totally right here, the call that seems to make problems is event.php in joomla libraries. I did do some modifications, that's why I also tried on a clean installation. Same issue. I'm not a php developer and I'm currently digging myself into this. I now think it's probably not a HikaShop issue but I thought maybe you'd see the issue right away.
The call which produces the warning is following:
$args should be an array reference as here is the complete code snippet
As I already said I'm a newbie in php. I tried to pass &$args instead of $args, but this resulted in an invalid php file.
I'd appreciate any quick suggestion how to approach such a happening.
Best Regards,
Fabio
You're totally right here, the call that seems to make problems is event.php in joomla libraries. I did do some modifications, that's why I also tried on a clean installation. Same issue. I'm not a php developer and I'm currently digging myself into this. I now think it's probably not a HikaShop issue but I thought maybe you'd see the issue right away.
The call which produces the warning is following:
Code:
return call_user_func_array(array($this, $event), $args);
$args should be an array reference as here is the complete code snippet
Code:
/**
* Method to trigger events.
* The method first generates the even from the argument array. Then it unsets the argument
* since the argument has no bearing on the event handler.
* If the method exists it is called and returns its return value. If it does not exist it
* returns null.
*
* @param array &$args Arguments
*
* @return mixed Routine return value
*
* @since 11.1
*/
public function update(&$args)
{
// First let's get the event from the argument array. Next we will unset the
// event argument as it has no bearing on the method to handle the event.
$event = $args['event'];
unset($args['event']);
/*
* If the method to handle an event exists, call it and return its return
* value. If it does not exist, return null.
*/
if (method_exists($this, $event))
{
return call_user_func_array(array($this, $event), $args);
}
}
As I already said I'm a newbie in php. I tried to pass &$args instead of $args, but this resulted in an invalid php file.
I'd appreciate any quick suggestion how to approach such a happening.
Best Regards,
Fabio
Please Log in or Create an account to join the conversation.
8 years 10 months ago #281275
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Warning after update to 2.0
Hello,
So if it's related to Joomla itself ; you should report the warning to Joomla.
There is nothing I can do in HikaMarket since it using the same code than in the Joomla core :
github.com/joomla/joomla-cms/blob/bcf386...oduleHelper.php#L272
github.com/joomla/joomla-cms/blob/6e07ca...ls/searches.php#L151
github.com/joomla/joomla-cms/blob/7ab744...pers/fields.php#L459
( etc )
Regards,
So if it's related to Joomla itself ; you should report the warning to Joomla.
There is nothing I can do in HikaMarket since it using the same code than in the Joomla core :
github.com/joomla/joomla-cms/blob/bcf386...oduleHelper.php#L272
github.com/joomla/joomla-cms/blob/6e07ca...ls/searches.php#L151
github.com/joomla/joomla-cms/blob/7ab744...pers/fields.php#L459
( etc )
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.203 seconds