1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-04 02:14:06 +02:00
This commit is contained in:
Robin Appelman 2019-01-23 18:56:44 +01:00
commit c29fe61ad1
24 changed files with 1242 additions and 50 deletions

View file

@ -17,7 +17,7 @@ class HeaderParser {
'A8type/Iversion/Iprotocol/A260server/A260nick/A260map/A260game/fduration/Vticks/Vframes/Vsigon',
$head
);
if (!isset($info['type']) || $info['type'] !== 'HL2DEMO') {
if (!isset($info['type']) || 'HL2DEMO' !== $info['type']) {
throw new \InvalidArgumentException('Not an HL2 demo');
}
@ -52,7 +52,7 @@ class HeaderParser {
if (!is_readable($path)) {
throw new \InvalidArgumentException('Unable to open demo: ' . $path);
}
$fh = fopen($path, 'rb');
$fh = fopen($path, 'r');
return $this->parseStream($fh);
}