Fix GroupInfo model

This commit is contained in:
Pierre HUBERT 2018-07-14 11:37:06 +02:00
parent c014dbdd48
commit 8e0eba4385

View File

@ -131,15 +131,15 @@ class GroupInfo extends BaseUniqueObject {
} }
//Get and set virtual directory //Get and set virtual directory
public function set_virtual_directory(int $virtual_directory){ public function set_virtual_directory(string $virtual_directory){
$this->virtual_directory = $virtual_directory; $this->virtual_directory = $virtual_directory == "" ? null : $virtual_directory;
} }
public function has_virtual_directory() : bool { public function has_virtual_directory() : bool {
return $this->virtual_directory > -1; return $this->virtual_directory != null;
} }
public function get_virtual_directory() : int { public function get_virtual_directory() : string {
return $this->virtual_directory; return $this->virtual_directory != null ? $this->virtual_directory : "null";
} }
} }