diff options
| author | Greg Roach <fisharebest@gmail.com> | 2013-12-21 14:26:09 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2013-12-21 14:26:09 +0000 |
| commit | cff6004d190f3bc39e8d5c81356478af0b346163 (patch) | |
| tree | 8aa65b36025cca80c3117a0371a4d6166992652a | |
| parent | 781641bf34ee2eb88324771575bba2aa3e4866b0 (diff) | |
| download | webtrees-cff6004d190f3bc39e8d5c81356478af0b346163.tar.gz webtrees-cff6004d190f3bc39e8d5c81356478af0b346163.tar.bz2 webtrees-cff6004d190f3bc39e8d5c81356478af0b346163.zip | |
#1257213 - PHP5.5 - preg_replace /e modifer when importing inline media
| -rw-r--r-- | includes/functions/functions_import.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/functions/functions_import.php b/includes/functions/functions_import.php index f1e6158997..7aaa1e5d55 100644 --- a/includes/functions/functions_import.php +++ b/includes/functions/functions_import.php @@ -967,7 +967,7 @@ function create_media_object($level, $gedrec, $ged_id) { if (!$xref) { $xref = get_new_xref("OBJE", $ged_id); // renumber the lines - $gedrec = preg_replace("/^(\d+) /me", "($1-$level).' '", $gedrec); + $gedrec = preg_replace_callback('/\n(\d+)/', function ($m) use ($level) { return "\n" . ($m[1] - $level); }, $gedrec); // convert to an object $gedrec = str_replace("\n0 OBJE\n", '0 @' . $xref . "@ OBJE\n", $gedrec); // Fix Legacy GEDCOMS |
