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

Failing test: latest string attribute used in a calculation instead of numeric array index #19

Merged
merged 4 commits into from
Dec 19, 2019
Merged

Conversation

LaravelFreelancerNL
Copy link
Contributor

Failing unittest:

in src/Parser.php at line 112 $currentPath[$currentLevel] holds the/a previously found attribute string which is used for a calculation.

Error:
A non-numeric value encountered

src/Parser.php:112
test/JsonMachineTest/JsonPointerTest.php:16

in src/Parser.php at line 112 $currentPath[$currentLevel] holds thepreviously found attribute string ("previous_download") which is then used for a calculation.

Error:
A non-numeric value encountered

src/Parser.php:112
test/JsonMachineTest/JsonPointerTest.php:16
@halaxa
Copy link
Owner

halaxa commented Dec 12, 2019

@LaravelFreelancerNL It should be fixed. Please check that it works. Note that I moved your test as dataset to ParserTest and reduced the example file to minimal version which is able to represent the problem. Side note: your test was failing on the fact that JsonMachine instance is not countable. It only implements IteratorAggregate, not Countable. But the problem was real, thanks.

@halaxa
Copy link
Owner

halaxa commented Dec 19, 2019

Ping @LaravelFreelancerNL

@halaxa
Copy link
Owner

halaxa commented Dec 19, 2019

@LaravelFreelancerNL confirmed the fix works via email.

@halaxa halaxa merged commit e36ad6c into halaxa:master Dec 19, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants