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.
The __construct function in SchemaCache generates an empty $cid, at least on my setup:
Mamp pro 2.0 - php 5.3.6 - see screenshot underneath. I'm seeing this in both D8 and D.
Patch attached generates the cid as 'schema:runtime:1'
Comment | File | Size | Author |
---|---|---|---|
#5 | 1289364-after.patch | 1.51 KB | swentel |
#2 | 1289364-before.patch | 1009 bytes | swentel |
#2 | 1289364-after.patch | 1.5 KB | swentel |
empty_cid.patch | 529 bytes | swentel | |
empty-cid.png | 25.73 KB | swentel |
Comments
Comment #1
chx CreditAttribution: chx commentedWell spotted! tests?
Comment #2
swentel CreditAttribution: swentel commentedAdded a very simple test - the before patch will fail, the after should pass.
Should cache_set also do nothing if the $cid is empty ?
Comment #3
catchLooks good, nice find!
Comment #4
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks!
Comment #5
swentel CreditAttribution: swentel commentedHere's the 7.x version.
Comment #7
swentel CreditAttribution: swentel commentedHmm, ok, I don't really see why this might trigger an exception there - just trying another review, maybe there's been a slight glitch - will ping one of the testbot maintainers afterwards (or I should try it out locally first maybe)
Comment #8
swentel CreditAttribution: swentel commented#5: 1289364-after.patch queued for re-testing.
Comment #9
catchLooks fine for 7.x too.
Comment #10
webchickCommitted and pushed to 7.x. Thanks!
Comment #11
webchick