Spin-off from #1215104: Use the non-interactive installer in WebTestBase::setUp()
Problem
- Any call to drupal_cron_run() (re-)enables writing of the current $user's session.
Details
- drupal_save_session() contains a pointer to the handbook page http://drupal.org/node/218104 that explains how to use it properly (which, alas, should really be documented on the API function instead).
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | drupal7-cron_run_session_save-1688016-8.patch | 679 bytes | lucascaro |
| #6 | drupal8.cron-run-session-save.6.patch | 699 bytes | sun |
| drupal8.cron-run-session-save.0.patch | 685 bytes | sun |
Comments
Comment #1
sunComment #2
lucascaro commentedSeems to be the right way to do it and it fixes existing problems at least with install_drupal :)
Comment #3
sundrupal8.cron-run-session-save.0.patch queued for re-testing.
Comment #4
sundrupal8.cron-run-session-save.0.patch queued for re-testing.
Comment #5
catchLooks fine but the variable name
$old_save_sessiondoesn't look right. Can we just call that $original_session or something?Comment #6
sun$original_sessionwould be misleading, since the variable doesn't contain $_SESSION.So I went with
$original_session_saving.Comment #7
catchOK that works well enough, I can't think of anything better. Committed/pushed to 8.x, moving to 7.x for backport.
Comment #8
lucascaro commentedBackported!
Comment #9
lucascaro commentedComment #10
sunThanks!
Comment #11
webchickHm. That variable name is indeed pretty terrible, but all the alternatives I can think of are 57-characters long and I know how you feel about those. ;P
Committed and pushed to 7.x. Thanks!