-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Despite being wrapped in include_once(), quickroute_jpeg_extension_data.php can be included twice, causing a redefinition error on line 12 (class QuickRouteJpegExtensionData).
This occurs when running show_map.php. On line 2 of show_map.php, show_map.controller.php is included.
Line 3 of show_map.controller.php is
include_once(dirname(__FILE__) ."/include/quickroute_jpeg_extension_data.php");
Then, on line 3 of show_map.php, the following call is made:
include_once("./include/quickroute_jpeg_extension_data.php");
It seems that include_once() can deem these two paths to be different (depending on the value of dirname(FILE)), and thus quickroute_jpeg_extension_data.php can be included twice, resulting in the redefinition error.
The solution is to change line 3 of show_map.php to
include_once(dirname(__FILE__) ."/include/quickroute_jpeg_extension_data.php");
so that it matches the include in show_map.php, show_map.controller.php
Alternatively, line 3 of show_map.php could be removed as it is redundant.