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 ?

CommentFileSizeAuthor
#2 2554011-oa_files-og_vocab-2.patch4.23 KBhefox
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

msizec created an issue. See original summary.

hefox’s picture

Version: 7.x-2.43 » 7.x-2.x-dev
Component: Documents App » Files App
Status: Active » Fixed
FileSize
4.23 KB

Hiya, 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.

hefox’s picture

Status: Fixed » Needs review

wrong state