missing variable safeguard in /components/com_hikashop/router.php

  • Posts: 144
  • Thank you received: 4
  • Hikashop Business
9 years 5 months ago #206270

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28
-- Error-message(debug-mod must be tuned on) -- : Notice: Undefined index: task in /home/icxdev04/public_html/components/com_hikashop/router.php on line 53

Since upgrading to Hikashop 2.5.0 I've been seeing ( during checkout )

Notice: Undefined index: task in /home/icxdev04/public_html/components/com_hikashop/router.php on line 53

at the top of the page. Within that router.php file, shouldn't

if( ( isset($query['ctrl']) && $query['ctrl']=='checkout' || isset($query['view']) && $query['view']=='checkout' ) && !empty($query['Itemid']) && ( !isset($query['task']) && !isset($query['layout']) || $query['task']=='step' || (isset($query['layout']) && $query['layout']=='step' )) ) {

be
if( ( isset($query['ctrl']) && $query['ctrl']=='checkout' || isset($query['view']) && $query['view']=='checkout' ) && !empty($query['Itemid']) && ( !isset($query['task']) && !isset($query['layout']) || (isset($query['task']) && $query['task']=='step' ) || (isset($query['layout']) && $query['layout']=='step' )) ) {

This seems to make sense and makes the issue go away.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #206311

Hi,

Yes indeed that makes sense, thanks for your report :)

The following user(s) said Thank You: icomex

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds
Powered by Kunena Forum