Ticket #1226 (new bug)
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 ?
