[wp-trac] [WordPress Trac] #58201: Incorrect condition in wp_check_php_mysql_versions()
WordPress Trac
noreply at wordpress.org
Fri Jul 7 11:11:48 UTC 2023
#58201: Incorrect condition in wp_check_php_mysql_versions()
-------------------------------------+-----------------------
Reporter: mikeyzm | Owner: audrasjb
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.3
Component: Bootstrap/Load | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+-----------------------
Comment (by hztyfoon):
Replying to [comment:10 SergeyBiryukov]:
> Thanks for the commit!
>
> Replying to [comment:8 audrasjb]:
> > This changeset adds a check for the existence of `db.php` at the
default path `ABSPATH . 'wp-content/db.php'`, even if `WP_CONTENT_DIR` is
defined and `db.php` is placed in `WP_CONTENT_DIR`.
>
> Just to clarify for future reference, that's not what this changeset
does :)
+1 from me.
Thanks sergey for pointing it out and clarifying.
Looks to me the clarification in your comment is helpful for future
reference and clarity.
Looks to me the ticket description by mikeyzm is pretty clear. But let me
try to add a bit more clarity.
Changeset [49161] (please check that changesheet first) introduced an
incorrect condition.
And that is, even if `WP_CONTENT_DIR` is defined & `db.php` file does
exist, it (the mentioned [49161] changesheet's code) goes on to check for
the existance of the `db.php` using `ABSPATH` (`ABSPATH . 'wp-
content/db.php'`) even though it already checked using `WP_CONTENT_DIR`
and found the `db.php` to be `existent`. Which is not right.
Because if `WP_CONTENT_DIR` is defined and `db.php` is found to be
existant, why should it then go again to check for the existance of the
same file using `ABSPATH`. That's totally unnecessary.
Hope my explanation adds bit more clarity about this ticket it's
commit/changesheet ([56152]). Thanks 😊.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58201#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list