This is a fun one. It’s being called 12 separate times in a 228 line switch statement, with all of the calls inside if/else and nested if/else statements.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
A few details:
- common.inc is a ~2,000 line file with 22 “common” functions, only one of which is used in
getRules()
. - Don’t let
$self
fool you, this isn’t a class method.$self
is set to$_SERVER['REQUEST_URI'];
. - The function parameters are set from from
$_GET
, an included config file, a database query, with only two being hard coded. - There are quite a few variables being set within the method by iterating through a database query result. I’m guessing
$fromfile
,$PassedValue
, and$doAction
are all set in thatforeach
. How many others?
Evil. Pure evil.