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'

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Well spotted! tests?

swentel’s picture

FileSize
1.5 KB
1009 bytes

Added a very simple test - the before patch will fail, the after should pass.
Should cache_set also do nothing if the $cid is empty ?

catch’s picture

Component: cache system » base system
Status: Needs review » Reviewed & tested by the community

Looks good, nice find!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks!

swentel’s picture

Version: 8.x-dev » 7.x-dev
Status: Fixed » Needs review
FileSize
1.51 KB

Here's the 7.x version.

Status: Needs review » Needs work

The last submitted patch, 1289364-after.patch, failed testing.

swentel’s picture

Status: Needs work » Needs review

Hmm, 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)

swentel’s picture

#5: 1289364-after.patch queued for re-testing.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine for 7.x too.

webchick’s picture

Issue tags: +Needs backport to D7

Committed and pushed to 7.x. Thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.