summaryrefslogtreecommitdiff
path: root/app/Http/RequestHandlers/PendingChangesLogData.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2021-01-14 10:03:49 +0000
committerGreg Roach <greg@subaqua.co.uk>2021-01-14 10:03:49 +0000
commitaaad15c2f56c34c08ffa00ca5fbf9b4f4dc42640 (patch)
tree6ad5a2e0648e99aefc61ab668cbf1d49d05931d4 /app/Http/RequestHandlers/PendingChangesLogData.php
parente172383b8d1dc462218f743b1e04ca6a5babd14e (diff)
downloadwebtrees-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.php4
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 = [];