Ticket #1226 (new bug)

Opened 8 months ago

Last modified 7 months ago

error in php error logs map.php

Reported by: jeanyves Owned by: micha
Priority: major Milestone: unassigned
Component: BW Trips Version: production
Keywords: trip map Cc: micha, lupochen, micha@…
Follow up needed: test Frequently reported: 1
Announce on BW: no

Description

They are many errors in php error logs created because of map.php

one of them says : [30-Jun-2009 19:52:03] PHP Notice: Undefined offset: 1 in /home/bwrox/www.bewelcome.org/build/trip/templates/map.php on line 155

it probably happen because of the line 145 in the same file which set

   

$point = rand(1,count($locations));

problem is that if the count value is 0, it returns 1 and $point is used on line 155 for an access to

$location[1]

may be the thing to investigate is why location is empty, or simply to change for

$point = rand(0,count($locations));

I don't know what to do. I think this error is quite major because it must result in the javascript failing and nobody can see it

@Micha could you see about it ?

Change History

Changed 8 months ago by micha

  • cc micha, lupochen, micha@… added; micha lupochen removed
  • follow_up changed from none to review code
  • component changed from unknown to BW Trips
  • owner set to micha

Changed 7 months ago by micha

  • follow_up changed from review code to test

tried to fix that in r8913. Could you check that again in the error logs for test.bw.org?

Note: See TracTickets for help on using tickets.