diff --git a/php/classes/Guest.php b/php/classes/Guest.php index 1e5b3b1..a23e547 100644 --- a/php/classes/Guest.php +++ b/php/classes/Guest.php @@ -10,12 +10,12 @@ class Guest { private $guestXml, $guestXmlFile, $xp, $root; public $Id, $Start, $Ip, $email; - function __construct($Ip_, $email_){ + function __construct($Ip_, $email_ = null){ - if($email_ != null) { + if($email_) { $this->Start = getdate(); $this->Ip = $Ip_; - $this->email = $email_; + $this->email = $email_; } else { $this->Id = substr($Ip_,strlen("guest")); @@ -31,7 +31,7 @@ class Guest { $this->guestXml->load($this->guestXmlFile); $this->root = $this->guestXml->getElementsByTagName("guests")->item(0); } - $this->xp = new domxpath($this->guestXml); + $this->xp = new domxpath($this->guestXml); } private function generateXML() { -- libgit2 0.21.2