Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unattached quotes cause undefined array key spam #8

Open
reedy opened this issue Jul 18, 2023 · 0 comments
Open

Unattached quotes cause undefined array key spam #8

reedy opened this issue Jul 18, 2023 · 0 comments

Comments

@reedy
Copy link

reedy commented Jul 18, 2023

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
@reedy reedy changed the title Unattached quotes cost undefined array key spam Unattached quotes cause undefined array key spam Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant