1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Legalpad - fix a bug for documents with no signatures

Summary: be sure to use array() (and not null) so we don't fatal if we have no signatures

Test Plan: no more fatal when editing a signature-less document

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, epriestley, aran

Differential Revision: https://secure.phabricator.com/D8000
This commit is contained in:
Bob Trahan 2014-01-17 14:05:18 -08:00
parent 7686efb896
commit 71b729f5e5

View file

@ -226,7 +226,7 @@ final class LegalpadDocumentQuery
$signatures = mgroup($signatures, 'getDocumentPHID');
foreach ($documents as $document) {
$sigs = idx($signatures, $document->getPHID());
$sigs = idx($signatures, $document->getPHID(), array());
foreach ($sigs as $index => $sig) {
if ($sig->getDocumentVersion() != $document->getVersions()) {
unset($sigs[$index]);