diff options
author | Simon Rettberg | 2017-05-09 13:12:27 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-05-09 13:12:27 +0200 |
commit | 3adba792b55fbcaeda42f8c1588b2889ec308b39 (patch) | |
tree | 951604176c44136216553ec9fa8c9143588a8a54 /modules-available/locationinfo | |
parent | [rebootcontrol] API call for rebuilding all modules (diff) | |
download | slx-admin-3adba792b55fbcaeda42f8c1588b2889ec308b39.tar.gz slx-admin-3adba792b55fbcaeda42f8c1588b2889ec308b39.tar.xz slx-admin-3adba792b55fbcaeda42f8c1588b2889ec308b39.zip |
[locationinfo] Fix more undefined offset access
Fixes #3133
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r-- | modules-available/locationinfo/page.inc.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index 4ad2ab0f..d43380c7 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -500,15 +500,16 @@ class Page_LocationInfo extends Page $openingtimes = array(); } if ($this->isEasyMode($openingtimes)) { - echo Render::parse('timetable', array('id' => $id, - 'openingtime0' => $openingtimes[0]['openingtime'], - 'closingtime0' => $openingtimes[0]['closingtime'], - 'openingtime1' => $openingtimes[1]['openingtime'], - 'closingtime1' => $openingtimes[1]['closingtime'], - 'openingtime2' => $openingtimes[2]['openingtime'], - 'closingtime2' => $openingtimes[2]['closingtime'], + $data = array('id' => $id, 'easyMode' => true, - 'expertMode' => false)); + 'expertMode' => false + ); + foreach ($openingtimes as $idx => $ot) { + foreach ($ot as $k => $v) { + $data[$k . $idx] = $v; + } + } + echo Render::parse('timetable', $data); } else { $index = 0; |