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

Warning in TurtleParser when parsing typed literals. #155

Open
cgutteridge opened this issue May 15, 2024 · 1 comment
Open

Warning in TurtleParser when parsing typed literals. #155

cgutteridge opened this issue May 15, 2024 · 1 comment
Labels

Comments

@cgutteridge
Copy link
Contributor

PHP 8.0.30 (cli) (built: Aug 3 2023 17:13:08) ( NTS gcc x86_64 )
[12.15s] PHP Warning: Trying to access array offset on value of type int in /srv/hedgehog/app/phplib/composer/vendor/semsol/arc2/parsers/ARC2_TurtleParser.php on line 566

PHP Version
PHP 8.0.30 (cli) (built: Aug 3 2023 17:13:08) ( NTS gcc x86_64 )

It only seems to happen on lines with a typed literal, and not every time that line shows up. eg. a file of 1000 identical triples:
http://id.southampton.ac.uk/building/FOO http://www.w3.org/2004/02/skos/core#notation "FOO"^^http://id.southampton.ac.uk/ns/building-code-scheme .

causes only a few warnings, not one per line

I've done some debugging and the warning is in xRDFLiteral when sometimes the value of $v seems to be truncated eg.:
string(51) " "FOO"^^<http://id.southampton.ac.uk/ns/building-co"

It feels like it's reading in blocks of data and ensuring it's got a full triple but not checking that the ^^ part is complete too?

@k00ni k00ni added the bug label May 20, 2024
@k00ni
Copy link
Collaborator

k00ni commented May 27, 2024

Thanks for the report, even though I lack the time to have a deeper look. Feel free to dig deeper (+PR) and I will be happy to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants