Closed chr-fritz closed 4 years ago
It feels to me like converting to a constant is just hiding the problem (the variable being unset when being used prior to being defined). I don't have PHP 7.4 to test on right now, but I think a more correct solution would be just to move the definition of the $base_path
variable in to core.php
. Moving it to earlier in requesthandler.php
does help, but moving it to core.php
would also make the variable available to files in the scripts/
directory so those files don't need changes. Of course one can debate the merits of using a constant instead of a variable, but the actual bug here is that we're defining the variable in the wrong place.
I hope you consider the fix in 66ba8bb to be sufficient. Thank you for finding this bug.
When running dns-ui under PHP 7.4.1 it will produce the following error:
The reason about this is, that the variable
$base_path
is not available incore.php
. This PR replaces this variable by a new constantBASE_PATH
which is set beforecore.php
is included.