diff --git a/Board0x88Config.php b/Board0x88Config.php old mode 100644 new mode 100755 diff --git a/CHESS_JSON.php b/CHESS_JSON.php old mode 100644 new mode 100755 diff --git a/DGTGameParser.php b/DGTGameParser.php old mode 100644 new mode 100755 diff --git a/FenParser0x88.php b/FenParser0x88.php old mode 100644 new mode 100755 diff --git a/GameParser.php b/GameParser.php old mode 100644 new mode 100755 diff --git a/MoveBuilder.php b/MoveBuilder.php old mode 100644 new mode 100755 diff --git a/PgnGameParser.php b/PgnGameParser.php old mode 100644 new mode 100755 diff --git a/PgnParser.php b/PgnParser.php old mode 100644 new mode 100755 index dc7e244..89b7fb0 --- a/PgnParser.php +++ b/PgnParser.php @@ -14,7 +14,13 @@ class PgnParser { if ($pgnFile) { $this->pgnFile = $this->sanitize($pgnFile); + + if(!file_exists($this->pgnFile)){ + throw new Exception("File not found: ". $this->pgnFile); + } + } + $this->_fullParsing = $fullParsing; $this->gameParser = new GameParser(); $this->pgnGameParser = new PgnGameParser(); diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/autoload.php b/autoload.php old mode 100644 new mode 100755 diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 diff --git a/test/ParserTest.php b/test/ParserTest.php old mode 100644 new mode 100755 diff --git a/test/pgn/1001-brilliant-checkmates.pgn b/test/pgn/1001-brilliant-checkmates.pgn old mode 100644 new mode 100755 diff --git a/test/pgn/problematic.pgn b/test/pgn/problematic.pgn old mode 100644 new mode 100755 diff --git a/test/pgn/problematic2.pgn b/test/pgn/problematic2.pgn old mode 100644 new mode 100755