I created a files section.
I created a vocabulary and a taxonomy-based folder structure in it.
I added a reference to a term to the "document page" content type, then selected the newly created vocabulary.
Then when I open the page to create a new document, sometimes ive got an error sayaing
in_array is waiting for parameter 2 to be an array, but got a bollean instead (line 905 in oa_files.module).
Ive checked the code.
it seems the problem is when the function returns a FALSE :
$vids = og_vocab_get_accessible_vocabs('node', $node_type, OG_VOCAB_FIELD);
Ive replaced :
if (in_array($vid, $vids)) {
with
if (is_array($vids) && in_array($vid, $vids)) {
And theres 2 others lines with the same test in this file. To be changed also i think.
Maybe someone could provide a patch and review my solution ?
Comment | File | Size | Author |
---|---|---|---|
#2 | 2554011-oa_files-og_vocab-2.patch | 4.23 KB | hefox |
Comments
Comment #2
hefox CreditAttribution: hefox at Phase2 commentedHiya, thanks for the report.
Please try out attached patch. I tested that it did not have any syntax errors but otherwise haven't tested it.
Comment #3
hefox CreditAttribution: hefox at Phase2 commentedwrong state