Blog icon indicating copy to clipboard operation
Blog copied to clipboard

ErrorException when saving post with no tags

Open pavsid opened this issue 8 years ago • 4 comments

Creating a new post without any tags throws the following error:-

production.ERROR: ErrorException: array_diff(): Argument #1 is not an array in /home/asgardcms/public_html/Modules/Tag/Traits/TaggableTrait.php:104

pavsid avatar Nov 16 '17 10:11 pavsid

This is the fix..

EloquentPostRepository.php:47

$post->setTags(array_get($data, 'tags', []));

pavsid avatar Nov 16 '17 12:11 pavsid

Thanks, you can send a PR with this if you want.

nWidart avatar Nov 16 '17 12:11 nWidart

@nWidart I'd like to start contributing, and am following the steps listed here , but am stuck at Run ./travis.sh - never used travis before, and have never sent a PR before, can you give me some pointers please?!

pavsid avatar Nov 16 '17 17:11 pavsid

No need for my PR anyway - looks like this issue was addressed in branch 2.0 so just needs merging into master?

pavsid avatar Nov 16 '17 17:11 pavsid