diff options
| author | fisharebest <fisharebest@gmail.com> | 2011-10-16 06:28:06 +0000 |
|---|---|---|
| committer | fisharebest <fisharebest@gmail.com> | 2011-10-16 06:28:06 +0000 |
| commit | 409e96207fff8b9c540f3789962a9ae1ff23fdbd (patch) | |
| tree | 1de8a3dd09ab39d66ad07c6150a86ecbf10cf59c | |
| parent | 4ec4c70ab42203c27f508a120c192802ac7e120f (diff) | |
| download | webtrees-409e96207fff8b9c540f3789962a9ae1ff23fdbd.tar.gz webtrees-409e96207fff8b9c540f3789962a9ae1ff23fdbd.tar.bz2 webtrees-409e96207fff8b9c540f3789962a9ae1ff23fdbd.zip | |
FIx: recent changes are not compatible with PHP5.2.
| -rw-r--r-- | library/WT/GedcomRecord.php | 5 |
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); |
