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.
Problem/Motivation
In \Drupal\Core\Database\Install\Tasks, we currently do:
$this->results[$message] = FALSE;
This is problematic because $message is output from t(), which may output an object at one point, and PHP does not allow storing objects in array keys.
Proposed resolution
Put the message in the array value instead.
Remaining tasks
Commit
User interface changes
No
API changes
None.
Data model changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#2 | 2560719-1.patch | 1.17 KB | stefan.r |
Comments
Comment #2
stefan.r CreditAttribution: stefan.r commentedComment #3
joelpittetSplit from a major so I'm bumping this as well. Also this patch looks great.
Needs likely a manual tests (install screen uses tasks I think and after installing a module through the UI) IIRC
Hopefully I get a free moment to test this out today, but anybody feel free to review.
Comment #4
stefan.r CreditAttribution: stefan.r commentedComment #5
stefan.r CreditAttribution: stefan.r commentedComment #6
stefan.r CreditAttribution: stefan.r commentedSeems this array is only used to print out the failure messages when we do $this->fail() from tasks, so did a manual install where I triggered 2 failures and a pass:
Confirmed this should work the same for mysql/postgres/sqlite, having reviewed their implementations of Tasks.
Comment #7
alexpottI manually tested - works a treat.
Comment #8
stefan.r CreditAttribution: stefan.r commentedComment #9
catchCommitted/pushed to 8.0.x, thanks!