summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/WT/GedcomRecord.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/library/WT/GedcomRecord.php b/library/WT/GedcomRecord.php
index 7c03c76d48..e6ec44c749 100644
--- a/library/WT/GedcomRecord.php
+++ b/library/WT/GedcomRecord.php
@@ -88,8 +88,9 @@ class WT_GedcomRecord {
// Look for the record in the database
if (!is_array($data)) {
if (version_compare(PHP_VERSION, '5.3', '>')) {
- // PHP 5.3 supports late static binding
- $data=static::fetchGedcomRecord($pid, $ged_id);
+ // PHP 5.3 supports late static binding, but the syntax breaks PHP 5.2,
+ // so wrap it in eval() to hide it from PHP 5.2
+ eval('$data=static::fetchGedcomRecord($pid, $ged_id);');
} else {
// PHP 5.2 does not - use a (slower) fallback.
$data=self::fetchGedcomRecord($pid, $ged_id);