Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This hasn't been used since Drupal 6, but it's still declared as global in bootstrap.inc, we should just remove it from that line.
Comment | File | Size | Author |
---|---|---|---|
#11 | remove_db_url-1881992-11.patch | 1.56 KB | mitron |
#9 | remove_db_url-1881992-002.patch | 1.4 KB | mitron |
#1 | remove_db_url-1881992-001.patch | 788 bytes | karschsp |
Comments
Comment #1
karschsp CreditAttribution: karschsp commentedSimple enough. Let's see if I remember how to roll a patch.
Comment #2
karschsp CreditAttribution: karschsp commentedDarn. Setting to "needs review"
Comment #3
joris_luciusNot much to test here.
Did a search for
$db_url
and did not find any others.@karschsp not sure if you tried that, just making sure
Comment #4
longwaveThe only other mention of db_url is in install.core.inc, and I think this should stay for security:
(see also #1816124: Fix installer PHP code execution issues from SA-CORE-2012-003 (and backport anything to 7.x-dev as necessary))
Comment #5
mitron CreditAttribution: mitron commentedLongwave in •4 is correct. There are only two mentions of db_url. One is removed by the patch. The other should remain in the code. The patch appears to be correct and does not appear to create any other potential problems.
Comment #6
longwaveComment #7
catchThat code only works because db_url is previously exported as global in drupal_settings_initialize(), so it's not going to be correct if that's removed from bootstrap.inc
We don't support putting a Drupal 6 settings.php into a Drupal 8 site, not for upgrades or any other reason, so I think it's OK to remove both here.
Comment #8
mitron CreditAttribution: mitron commentedOK, so the value for $db_url would come from including
settings.php
inside drupal_settings_initialize(). If it is not made global in the same function, it would never be in $GLOBALS as shown in #4, thus leaving it there is pointless. If it is OK to remove the first reference, it therefore must be OK to remove the second.Comment #9
mitron CreditAttribution: mitron commentedProposed patch.
Comment #10
longwaveThe comment in install.core.inc still mentions 'db_url'.
Comment #11
mitron CreditAttribution: mitron commentedWith comment removed.
Comment #13
mitron CreditAttribution: mitron commented#11: remove_db_url-1881992-11.patch queued for re-testing.
Comment #14
catchLooks good to me now.
Comment #15
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks.