If you try to sort the dblog messages ascendingly (admin/reports/dblog?sort=asc&order=Type
), you will receive an error like this:
Fatal error: [] operator not supported for strings in /var/www/core/includes/tablesort.inc on line 84
This is because dblog.admin.inc
tries to set the table cell class as a string rather than an array. Trivial fix. Patch to follow.
Comment | File | Size | Author |
---|---|---|---|
#12 | test-and-patch.patch | 1.35 KB | marcingy |
#10 | test-only.patch | 783 bytes | marcingy |
#10 | test-and-patch.patch | 1.29 KB | marcingy |
#8 | fix-and-test.patch | 1.34 KB | marcingy |
#4 | test-only.patch | 841 bytes | marcingy |
Comments
Comment #1
TravisCarden CreditAttribution: TravisCarden commentedComment #2
TravisCarden CreditAttribution: TravisCarden commentedComment #3
BerdirFix looks good.
Sounds like this needs a test.
Comment #4
marcingy CreditAttribution: marcingy commentedTest and fix.
Comment #6
Berdir#4: fix-test-only.patch queued for re-testing.
Comment #8
marcingy CreditAttribution: marcingy commentedRe-roll
Comment #9
BerdirOperations should actually go through t().
I'm not sure if the assertion message here is necessary. They sometimes aren't that useful because they hide the string that we are actually looking for.
Comment #10
marcingy CreditAttribution: marcingy commentedSo locally I was getting a 200 for the inital test but the bot gets a 500 so this should work.
Comment #11
BerdirHm, might be a misunderstanding :)
I actually liked having the assertText() there because, as you figured out, the http response code depends on the php configuration. What I was talking about is just the assertion message, the "'Order by worked'" which essentially hides that we are looking for the Operations string. So you have to look at the code to understand what the assertion does.
Comment #12
marcingy CreditAttribution: marcingy commentedAh my bad, take 2!
Comment #13
BerdirStarting to feel bad :)
The assertion text message is optional. And if you leave it out, then the default message is almost exactly what you did there: "'"@text" found'". So all you need is assertText(t('Operations')) and then it's good to go :)
Comment #14
marcingy CreditAttribution: marcingy commentedOk but that is not the approached used elsewhere in the test in question eg
And also through out verifyReports() the optional string is always present. So I can change the patch but the tests for dblog look like they need a follow up if we are going down this approach because we lose consistency.
Comment #15
ParisLiakos CreditAttribution: ParisLiakos commentedLets keep it consistent me thinks
Comment #16
webchickYeah, let's get a minor follow-up for the assertion messages clean-up. For now, I agree with keeping things consistent.
Committed and pushed to 8.x. Thanks!