Welcome, Guest
Username Password: Remember me

PHP-Error in mod_mj_menu, helper.php line 38
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: PHP-Error in mod_mj_menu, helper.php line 38

PHP-Error in mod_mj_menu, helper.php line 38 13 years, 2 months ago #5319

On my site i got an error in this line:
foreach($items as $key=>$item)
since one can't be sure, that $items is an array.
I made a workaround like this (not nice code - it's a quickfix):

if(is_array($items))
{
foreach($items as $key=>$item)
for($i=0, $count=count($attributes); $i<$count; $i++)
if($item->$attributes[$i] != $values[$i])
{
unset($items[$key]);
break;
}
}
else
{
for($i=0, $count=count($attributes); $i<$count; $i++)
if($item->$attributes[$i] != $values[$i])
{
unset($items[$key]);
break;
}
}

Re: PHP-Error in mod_mj_menu, helper.php line 38 13 years, 2 months ago #5321

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
This issue is known and will be fixed in 1.0RC3, the patch is here: github.com/mobilejoomla/mobilejoomla/commit/80ecd1f65e9a0dcd38b90d08268c3c8d856d3b8d
  • Page:
  • 1
Time to create page: 0.06 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.