summaryrefslogtreecommitdiff
path: root/app/Http/Controllers/AdminTreesController.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2020-04-20 11:05:36 +0100
committerGreg Roach <greg@subaqua.co.uk>2020-04-20 11:05:36 +0100
commit54345d4d4e1f1d08aa7b6a6132968fa055751481 (patch)
treef5c0755d01558cbcf776304c057f4a04b7606ef6 /app/Http/Controllers/AdminTreesController.php
parentdb1aabc1f5e7c5d487028063f13ec85a777d5341 (diff)
downloadwebtrees-54345d4d4e1f1d08aa7b6a6132968fa055751481.tar.gz
webtrees-54345d4d4e1f1d08aa7b6a6132968fa055751481.tar.bz2
webtrees-54345d4d4e1f1d08aa7b6a6132968fa055751481.zip
Fix: #2917 - PHP converts numeric array keys from strings to integers
Diffstat (limited to 'app/Http/Controllers/AdminTreesController.php')
-rw-r--r--app/Http/Controllers/AdminTreesController.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/Http/Controllers/AdminTreesController.php b/app/Http/Controllers/AdminTreesController.php
index 761f9522ae..9e5f4ca345 100644
--- a/app/Http/Controllers/AdminTreesController.php
+++ b/app/Http/Controllers/AdminTreesController.php
@@ -265,8 +265,14 @@ class AdminTreesController extends AbstractBaseController
}
foreach ($all_links as $xref1 => $links) {
+ // PHP converts array keys to integers.
+ $xref1 = (string) $xref1;
+
$type1 = $records[$xref1]->type;
foreach ($links as $xref2 => $type2) {
+ // PHP converts array keys to integers.
+ $xref2 = (string) $xref2;
+
$type3 = isset($records[$xref2]) ? $records[$xref2]->type : '';
if (!array_key_exists($xref2, $all_links)) {
if (array_key_exists(strtoupper($xref2), $upper_links)) {