Gracefully skiping games the parser don't understand

This commit is contained in:
DHTMLGoodies
2017-02-22 18:15:12 +01:00
parent 1fcf22de2c
commit 83efc94107
4 changed files with 56 additions and 1 deletions

View File

@@ -160,7 +160,13 @@ class PgnParser
$games = $this->getUnparsedGames();
$ret = array();
for ($i = 0, $count = count($games); $i < $count; $i++) {
$ret[] = $this->getParsedGame($games[$i]);
try{
$g = $this->getParsedGame($games[$i]);
$ret[] = $g;
}catch(Exception $e){
}
}
return $ret;
}