Todo #2346
closeddo we need to change our require() calls to require_once()?
0%
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.