Project

General

Profile

Actions

Todo #2346

closed

do we need to change our require() calls to require_once()?

Added by Darren Embry about 13 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
04/05/2012
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

Not sure if this is the right venue to start a discussion, but...

My change to vlsb.inc as part of this changeset:
https://github.com/bsdperimeter/pfsense/commit/d7afd9001e83139bc3247644b70f359e3c40a361

Seems to have triggered a "cannot redeclare function" type error once.
But I can't remember when this happened and my attempts to reproduce it are failing.

Regardless, when that was happening I did this workaround:
https://github.com/bsdperimeter/pfsense/commit/f57a578d1cd3f117947c84921b9984f3a586e41d

I have reason to believe that at some point a call to require_once("filter.inc") was performed before a call to require("filter.inc").
This type of thing will trigger a function or class redeclaration error.

Is there any reason we shouldn't find all our require() calls---at least the ones pointing to /etc/inc/xxx.inc files that pretty much just define functions and/or classes---and switch them over to require_once()?

You can open this discussion up to anyone else if you want.

Actions #1

Updated by Chris Buechler almost 12 years ago

  • Status changed from New to Closed
Actions #2

Updated by Chris Buechler almost 12 years ago

  • Status changed from Closed to New
Actions #3

Updated by Chris Buechler over 9 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF