diff options
| author | Greg Roach <fisharebest@gmail.com> | 2015-02-11 19:15:22 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2015-02-11 19:15:22 +0000 |
| commit | 4ef917196ae6ef9ac9291f910403613bc9201858 (patch) | |
| tree | 2f2a238de7b1d7b83dc5f81647529d88d5155b78 | |
| parent | 4a2bab5f5b247cd9a3f521b9ed63bc77904e4907 (diff) | |
| download | webtrees-4ef917196ae6ef9ac9291f910403613bc9201858.tar.gz webtrees-4ef917196ae6ef9ac9291f910403613bc9201858.tar.bz2 webtrees-4ef917196ae6ef9ac9291f910403613bc9201858.zip | |
Fix #431
| -rw-r--r-- | includes/session.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/includes/session.php b/includes/session.php index b94a7b22d4..83910802f0 100644 --- a/includes/session.php +++ b/includes/session.php @@ -443,6 +443,12 @@ foreach (array(Filter::post('ged'), Filter::get('ged'), $WT_SESSION->GEDCOM, Sit break; } } +// No chosen tree? Use any one. +if (!$WT_TREE) { + foreach (Tree::getAll() as $WT_TREE) { + break; + } +} // These attributes of the currently-selected tree are used frequently if ($WT_TREE) { |
