diff --git a/.github/issue_template.md b/.github/issue_template.md index a925a6d..58f5074 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -1,4 +1,5 @@ ((Note: Please write in English)) + ((Short description of the issue in issue title)) (Description of the issue) @@ -23,4 +24,10 @@ ### PHP version -(PHP-version you encountered the issue with) \ No newline at end of file +(PHP-version you encountered the issue with) + +### SWS File + +((Note: You cannot upload sws-files directly. Please zip it first)) + +(link to download of your wrong sws-file) diff --git a/src/Sws.php b/src/Sws.php index fdc02b9..a4c0a9e 100644 --- a/src/Sws.php +++ b/src/Sws.php @@ -34,6 +34,7 @@ use JeroenED\Libpairtwo\Models\Sws as SwsModel; use JeroenED\Libpairtwo\Enums\TournamentSystem; use DateTime; + /** * This class reads a SWS file * @@ -519,10 +520,11 @@ class Sws extends SwsModel { switch ($type) { case 'String': - if (trim($data) == '') { + $data = trim($data); + if ($data == '') { return (is_null($default)) ? '' : $default; } - return trim($data); + return $data; break; case 'Hex': case 'Int':