- Patch #1216886 by pounard: _lock_id() shouldn't use drupal_static(), any cache clear would potentially make locks stall.

merge-requests/26/head
Dries Buytaert 2011-07-31 23:34:22 -04:00
parent 452d443c22
commit f60942fed0
1 changed files with 4 additions and 1 deletions

View File

@ -74,7 +74,10 @@ function lock_initialize() {
* Helper function to get this request's unique id.
*/
function _lock_id() {
$lock_id = &drupal_static(__FUNCTION__);
// Do not use drupal_static(). This identifier refers to the current
// client request, and must not be changed under any circumstances
// else the shutdown handler may fail to release our locks.
static $lock_id;
if (!isset($lock_id)) {
// Assign a unique id.