Actions
Bug #3234
closedCaptive Portal previously declared getNasIP()
Start date:
09/25/2013
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1
Affected Architecture:
Description
Reported in forum http://forum.pfsense.org/index.php/topic,66764.0.html:
Fatal error: Cannot redeclare getNasIP() (previously declared in /usr/local/captiveportal/radius_authentication.inc:53) in /etc/inc/captiveportal.inc on line 1576
captiveportal.inc and radius_authentication.inc have identical copies of getNasIP()
captiveportal.inc is not protected by "if (!function_exists('getNasIP')) {}" and there must be some paths where radius_authentication.inc is called first by something else, getNasIP() gets declared, then captiveportal.inc tries to declare it again.
Why is there identical duplicate code?
Should put the function 1 time somewhere common?
Actions