Opened 11 years ago
Closed 11 years ago
#28697 closed defect (bug) (fixed)
Fix ms_subdomain_constants()
Reported by: | TobiasBg | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Bootstrap/Load | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
ms_subdomain_constants()
brings parity between the SUBDOMAIN_INSTALL
and the deprecated VHOST
constants, introduced in [14452].
It's a two-step process, where the first run of the function checks and sets the constants as necessary, and where the second run is used to print debug warnings/errors.
However, the function does not account for "internal success". If the VHOST
constant was not set (it shouldn't be anymore), it doesn't set $error=false;
so that all checks are unnecessarily performed again in the next evaluation of the function (the if-condition false === $error
further up in the function is never true).
(If one then runs the function for a third time, an error will be shown, although nothing was wrong initially.)
Also, one of the if-conditions can be simplified.
In 29200: