From bf286ebcc425e5f99f6c4a57a0c63f100089af52 Mon Sep 17 00:00:00 2001 From: John Saigle <4022790+johnsaigle@users.noreply.github.com> Date: Wed, 23 Jan 2019 16:55:32 -0500 Subject: [PATCH] Update php/libraries/Candidate.class.inc Co-Authored-By: davidblader --- php/libraries/Candidate.class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php/libraries/Candidate.class.inc b/php/libraries/Candidate.class.inc index d1a653492f4..a09209b6a6c 100644 --- a/php/libraries/Candidate.class.inc +++ b/php/libraries/Candidate.class.inc @@ -627,7 +627,7 @@ class Candidate $where = array('cid' => $candID); $result = $db->pselectCol($query, $where); - return is_array($result) ? array_shift($result) : ''; + return (is_array($result) && count($result) > 0) ? array_shift($result) : ''; } /**