Skip to content
Snippets Groups Projects
Commit 3cb7ba8d authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by David Siegfried
Browse files

fix parameter count for sprintf() in StudipLock::get(), fixes #1247

Closes #1247

Merge request studip/studip!763
parent cd2da0ea
Branches
No related tags found
No related merge requests found
...@@ -49,7 +49,10 @@ class StudipLock ...@@ -49,7 +49,10 @@ class StudipLock
public static function get($lockname, $timeout = 10) public static function get($lockname, $timeout = 10)
{ {
if (self::$current !== null) { if (self::$current !== null) {
throw new UnexpectedValueException(sprintf('could not acquire new lock, %s still active')); throw new UnexpectedValueException(sprintf(
'could not acquire new lock, %s still active',
self::$current
));
} }
$ok = DBManager::get()->fetchColumn("SELECT GET_LOCK(?,?)", [self::lockname($lockname), $timeout]); $ok = DBManager::get()->fetchColumn("SELECT GET_LOCK(?,?)", [self::lockname($lockname), $timeout]);
if ($ok) { if ($ok) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment