From 11151636b8fdd49fd98265094b22e8d2f881ba9a Mon Sep 17 00:00:00 2001 From: Aria Burrell Date: Fri, 21 Jun 2019 18:24:29 -0600 Subject: [PATCH] Repaired items broken in php 7.3 --- library/PhpGedcom/Parser.php | 2 +- library/PhpGedcom/Record/Repo.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/library/PhpGedcom/Parser.php b/library/PhpGedcom/Parser.php index eb22212e..13cb8dbc 100644 --- a/library/PhpGedcom/Parser.php +++ b/library/PhpGedcom/Parser.php @@ -213,7 +213,7 @@ public function getCurrentLineRecord($pieces = 3) $line = trim($this->_line); - $this->_lineRecord = explode(' ', $line, $pieces); + $this->_lineRecord = array_pad(explode(' ', $line, $pieces), 3, ''); $this->_linePieces = $pieces; return $this->_lineRecord; diff --git a/library/PhpGedcom/Record/Repo.php b/library/PhpGedcom/Record/Repo.php index 8cd5fa08..91094648 100644 --- a/library/PhpGedcom/Record/Repo.php +++ b/library/PhpGedcom/Record/Repo.php @@ -66,7 +66,7 @@ class Repo extends Record implements Noteable * @param Phon $phon * @return Repo */ - public function addPhon($phon = new Phon) + public function addPhon($phon) { $this->phon[] = $phon; return $this; @@ -84,7 +84,7 @@ public function getPhon() * @param Refn $refn * @return Repo */ - public function addRefn($refn = new Refn) + public function addRefn($refn) { $this->refn[] = $refn; return $this; @@ -102,7 +102,7 @@ public function getRefn() * @param NoteRef $note * @return Repo */ - public function addNote($note = new NoteRef) + public function addNote($note = array()) { $this->note[] = $note; return $this; @@ -156,7 +156,7 @@ public function getName() * @param \PhpGedcom\Record\Addr $addr * @return Repo */ - public function setAddr($addr = new Addr) + public function setAddr($addr) { $this->addr = $addr; return $this;