From 3e08a2d982c2b189bdce466ab00c43eadb528bd7 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 22 Feb 2010 13:30:00 +0000 Subject: [PATCH] Error checking. --- ykval-revoke.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ykval-revoke.php b/ykval-revoke.php index 095fedf..76d9aa2 100644 --- a/ykval-revoke.php +++ b/ykval-revoke.php @@ -28,7 +28,9 @@ $db = new Db($baseParams['__YKVAL_DB_DSN__'], $baseParams['__YKVAL_DB_PW__'], $baseParams['__YKVAL_DB_OPTIONS__'], 'ykval-revoke:db'); -$db->connect(); +if (!$db->connect()) { + logdie("ERROR Database connect error"); +} # Check if key exists $r = $db->findBy('yubikeys', 'yk_publicname', $yk, 1);