Project

General

Profile

Actions

Bug #3234

closed

Captive Portal previously declared getNasIP()

Added by Phillip Davis about 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Captive Portal
Target version:
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 #1

Updated by Renato Botelho about 8 years ago

For instance, there is another copy of the same identical function on radius_accounting.inc

Actions #2

Updated by Phillip Davis about 8 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...

Actions #3

Updated by Renato Botelho about 8 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Renato Botelho about 8 years ago

  • Status changed from Feedback to New

Ermal will make changes here

Actions #6

Updated by Ermal Luçi over 7 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.

Actions #7

Updated by Chris Buechler over 7 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF