1
0
mirror of https://github.com/Yubico/yubikey-val.git synced 2025-01-20 10:52:15 +01:00

Error checking.

This commit is contained in:
Simon Josefsson 2010-02-22 13:30:00 +00:00
parent 8a727d3c28
commit 3e08a2d982

View File

@ -28,7 +28,9 @@ $db = new Db($baseParams['__YKVAL_DB_DSN__'],
$baseParams['__YKVAL_DB_PW__'], $baseParams['__YKVAL_DB_PW__'],
$baseParams['__YKVAL_DB_OPTIONS__'], $baseParams['__YKVAL_DB_OPTIONS__'],
'ykval-revoke:db'); 'ykval-revoke:db');
$db->connect(); if (!$db->connect()) {
logdie("ERROR Database connect error");
}
# Check if key exists # Check if key exists
$r = $db->findBy('yubikeys', 'yk_publicname', $yk, 1); $r = $db->findBy('yubikeys', 'yk_publicname', $yk, 1);