Bug #3234
closedCaptive Portal previously declared getNasIP()
100%
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?
Updated by Renato Botelho about 11 years ago
For instance, there is another copy of the same identical function on radius_accounting.inc
Updated by Phillip Davis about 11 years ago
This is easy to resolve, but best if one of the devs does it, as you guys will know which common include file you prefer it to be in...
Updated by Renato Botelho about 11 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset f58bfb932acf9924546d3b9a2c77899741adeb9a.
Updated by Renato Botelho about 11 years ago
Applied in changeset 8ad84ebb49f86e791427110233382bd5e804d503.
Updated by Renato Botelho about 11 years ago
- Status changed from Feedback to New
Ermal will make changes here
Updated by Ermal Luçi almost 11 years ago
- Status changed from New to Feedback
Put this to feedback since the changes will be made when CP functions get merged as system functionality.
Updated by Chris Buechler over 10 years ago
- Status changed from Feedback to Resolved