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

int value not accepted in EntryField builder when put()ing an entry #16

Open
danships opened this issue Jun 1, 2016 · 0 comments
Open

Comments

@danships
Copy link

danships commented Jun 1, 2016

Hi,

Great SDK implementation, better than the contentful one. I ran into an issue with the Management SDK.

When I use an int as the value for an EntryField, an Exception is thrown because the parseContent function attempts to interpret the value as an array.

PHP Warning: Invalid argument supplied for foreach() in /home/daan/git/talpa/dancedancedance-s2-middleware-php/vendor/incraigulous/contentful-sdk/src/PayloadBuilders/EntryField.php on line 101

I can work around it by explicitly casting to a string when setting the value, but a better way would be to fix this in the EntryField class perhaps.

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