jockchou / pb4php

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

File parser crashes on option rows in the input file #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a proto file containing 'option' commands
2. Run the parser
3. Parser will crash

What is the expected output? What do you see instead?
Correct proto-file with the options just ignored

What version of the product are you using? On what operating system?
SVN commit 41 on Linux

Please provide any additional information below.
To fix, add the following to _strip_comments:
$string = preg_replace('/^option\s+.*/m', '', $string);

Original issue reported on code.google.com by johan%ti...@gtempaccount.com on 3 Nov 2010 at 2:04