Closed (fixed)
Project:
Search API attachments
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2016 at 07:32 UTC
Updated:
9 May 2017 at 19:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
strykaizerComment #3
leksat commentedPhpdoc still says that $extensions should be a string, while in fact an array is passed here: http://cgit.drupalcode.org/search_api_attachments/tree/src/Plugin/search...
Other than that - looks good, thanks for the patch!
Comment #4
ekes commentedI can't actually work out at first glance why it stores a string; rather than storing an array and only imploding/exploding it when it's for the textfield of the form.Sorry it's the mime types it stores as a string and goes exploding and imploding, when it could just be an array (if updated in the schema). The extensions are just left as they are. So string it should be.
Comment #5
ekes commentedSo the docblock is correct it should be returning a string, it was rather unnecessarily concatenating the array. So this is the fix from above, but adds that it returning a string directly and more obviously.
I've pushed a version of the repo with this and other patches from the queue that are RTBC'd to sandbox updated version of Search API Attachments 8.x-1.x.
Comment #7
izus commentedActually here it doesn't change anything apart from switching the implode and explode uses.(i prefered to add supported extensions to an array so that we won't miss one day with the space at which we should be careful now when adding an extension support) but i'll take it :). contributions are all good :) and thanks for it !
this is now merged and will be part of next beta