ajbdev / phpsc2replay

Automatically exported from code.google.com/p/phpsc2replay
0 stars 1 forks source link

Parser fail on some replays if php_error_level set on lvl with notice #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. error_reporting(E_ALL);
2. try to parse attached replays
3. fail

What is the expected output? What do you see instead?
Division by zero or underfined offset

What version of the product are you using? On what operating system?
Last version, PHP 5.3.3, ubuntu server

Original issue reported on code.google.com by rel...@gmail.com on 24 Dec 2011 at 8:16

Attachments:

GoogleCodeExporter commented 8 years ago
I belive "Qasy vs Braga 2010-08-11 13 15 05.SC2Replay" is maybe a corrupt 
replay file, but not for sure.  It was played on version 1.0.2, but try and 
open it with the game and it loads with both players just sitting there and 
nothing happens.  Also the file size is 3.2 KB (very small) so if it was a real 
game, a player probably never joined/DC before the game began?

The "Artist vs Deathangel 2_0.SC2Replay" replay I parse fine.

I'm running PHP 5.3.2 on ubuntu 10.04

Original comment by kfletche...@gmail.com on 31 Dec 2011 at 3:12

GoogleCodeExporter commented 8 years ago
Did u enable to show all errors at php on start of scripts or at php.ini (for 
see notice)?

error_reporting(E_ALL);

Original comment by rel...@gmail.com on 31 Dec 2011 at 7:17

GoogleCodeExporter commented 8 years ago
Yes I did.  The Artist vs Deathangel parses fine.  Tried on my own box and test 
it here. http://kuukkeli.ath.cx/ooaemkee/SC2Replay/upload_file.php  yea it does 
throw some notices, but they are easily fixed.  I don't think I would really 
call that a issue at all.  The other replay though I would agree has some 
problems.  The gametime is 0 so that explains why its showing division by zero. 
 Probably a good thing to check for before you continue to parse the replay 
because not much would have happened in a game that has a gametime of 0 :)

Original comment by kfletche...@gmail.com on 31 Dec 2011 at 8:15