Commit 9c30a3d3273dd5916753e986d56246a9970d001f
1 parent
e99e11bb
Exists in
master
and in
96 other branches
arg default in constructor
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
php/classes/Guest.php
... | ... | @@ -10,12 +10,12 @@ class Guest { |
10 | 10 | private $guestXml, $guestXmlFile, $xp, $root; |
11 | 11 | public $Id, $Start, $Ip, $email; |
12 | 12 | |
13 | - function __construct($Ip_, $email_){ | |
13 | + function __construct($Ip_, $email_ = null){ | |
14 | 14 | |
15 | - if($email_ != null) { | |
15 | + if($email_) { | |
16 | 16 | $this->Start = getdate(); |
17 | 17 | $this->Ip = $Ip_; |
18 | - $this->email = $email_; | |
18 | + $this->email = $email_; | |
19 | 19 | } |
20 | 20 | else { |
21 | 21 | $this->Id = substr($Ip_,strlen("guest")); |
... | ... | @@ -31,7 +31,7 @@ class Guest { |
31 | 31 | $this->guestXml->load($this->guestXmlFile); |
32 | 32 | $this->root = $this->guestXml->getElementsByTagName("guests")->item(0); |
33 | 33 | } |
34 | - $this->xp = new domxpath($this->guestXml); | |
34 | + $this->xp = new domxpath($this->guestXml); | |
35 | 35 | } |
36 | 36 | |
37 | 37 | private function generateXML() { |
... | ... |