API page: https://api.drupal.org/api/drupal/includes%21lock.inc/function/lock_init...
If I'm reading the documentation correctly, there could be some unintended consequences if lock_initialize() is called twice.
If you have a lock already intact, and some other function attempts to call lock_initialize(), wouldn't this delete any existing locks from $locks?
Shouldn't it be something like:
function lock_initialize() {
global $locks;
if (!isset($locks)) {
$locks = array();
}
}
At the very least, the documentation should probably warn against using this function twice, but that doesn't seem extremely feasible since you can't always control how other modules call this function.
Comments
Comment #2
WidgetsBurritos commentedHere's a patch
Comment #3
WidgetsBurritos commented