facerecog: check key in post process

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-03-25 07:46:41 -07:00
parent 8cf910f3b6
commit 81708a4de7
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ class FaceRecognitionBackend extends Backend
// Post process
foreach ($faces as &$row) {
$row['id'] = $row['name'] ?: (int) $row['id'];
$row['id'] = \array_key_exists('name', $row) ? $row['name'] : (int) $row['id'];
$row['count'] = (int) $row['count'];
}