diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-01-14 10:03:49 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-01-14 10:03:49 +0000 |
| commit | aaad15c2f56c34c08ffa00ca5fbf9b4f4dc42640 (patch) | |
| tree | 6ad5a2e0648e99aefc61ab668cbf1d49d05931d4 /app/Http/RequestHandlers/PendingChangesLogData.php | |
| parent | e172383b8d1dc462218f743b1e04ca6a5babd14e (diff) | |
| download | webtrees-aaad15c2f56c34c08ffa00ca5fbf9b4f4dc42640.tar.gz webtrees-aaad15c2f56c34c08ffa00ca5fbf9b4f4dc42640.tar.bz2 webtrees-aaad15c2f56c34c08ffa00ca5fbf9b4f4dc42640.zip | |
Fix: bogus empty line shown in pending changes
Diffstat (limited to 'app/Http/RequestHandlers/PendingChangesLogData.php')
| -rw-r--r-- | app/Http/RequestHandlers/PendingChangesLogData.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Http/RequestHandlers/PendingChangesLogData.php b/app/Http/RequestHandlers/PendingChangesLogData.php index 1a1022d7a4..f888cd3d0d 100644 --- a/app/Http/RequestHandlers/PendingChangesLogData.php +++ b/app/Http/RequestHandlers/PendingChangesLogData.php @@ -82,8 +82,8 @@ class PendingChangesLogData implements RequestHandlerInterface $query = $this->pending_changes_service->changesQuery($params); $callback = function (stdClass $row) use ($tree): array { - $old_lines = explode("\n", $row->old_gedcom); - $new_lines = explode("\n", $row->new_gedcom); + $old_lines = $row->old_gedcom === '' ? [] : explode("\n", $row->old_gedcom); + $new_lines = $row->new_gedcom === '' ? [] : explode("\n", $row->new_gedcom); $differences = $this->myers_diff->calculate($old_lines, $new_lines); $diff_lines = []; |
