set NULL correctly in password update

Old code used 'NULL' but docterine wants null. Now it is possible again
to remove the password from a link share.
This commit is contained in:
Roeland Jago Douma 2015-06-24 12:36:26 +02:00
parent ceb80ac123
commit 6977eff106

View file

@ -1220,7 +1220,7 @@ class Share extends Constants {
$qb->update('`*PREFIX*share`')
->set('`share_with`', ':pass')
->where('`id` = :shareId')
->setParameter(':pass', is_null($password) ? 'NULL' : \OC::$server->getHasher()->hash($password))
->setParameter(':pass', is_null($password) ? null : \OC::$server->getHasher()->hash($password))
->setParameter(':shareId', $shareId);
$qb->execute();