Opened 12 years ago
Closed 12 years ago
#28697 closed defect (bug) (fixed)
Fix ms_subdomain_constants()
| Reported by: | TobiasBg | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.0 |
| Component: | Bootstrap/Load | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | multisite |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 29200: