Unattached quotes cause undefined array key spam
Opened this issue · 0 comments
reedy commented
When reading a file with a comment not attached to a translation block, there logs get spammy
foo.po
# Foo
msgid "Foo"
msgstr "Fop"
# foo
comments.php
<?php
require_once 'vendor/autoload.php';
$parser = new PoParser\Parser();
$parser->read("foo.po");
$ php comments.php
PHP Warning: Undefined array key "msgid" in /tmp/poparser/vendor/maxakawizard/po-parser/src/Parser.php on line 340
PHP Warning: Undefined array key "msgid" in /tmp/poparser/vendor/maxakawizard/po-parser/src/Parser.php on line 340
PHP Warning: Undefined array key "msgid" in /tmp/poparser/vendor/maxakawizard/po-parser/src/Parser.php on line 340
PHP Warning: Undefined array key "msgid" in /tmp/poparser/vendor/maxakawizard/po-parser/src/Parser.php on line 340
PHP Warning: Undefined array key "msgid" in /tmp/poparser/vendor/maxakawizard/po-parser/src/Entry.php on line 70
PHP Warning: Undefined array key "msgstr" in /tmp/poparser/vendor/maxakawizard/po-parser/src/Entry.php on line 75