Support » Plugin: AWS S3 Bucket Browser » Solved: in_array() expects parameter 2 to be array + output before page content

  • This thread outlines a warning output by the plugin.

    I had the same issue with errors/warnings being output (no matter what workarounds I put in place) – so I thought I’d fix the warning. The line is complaining about ‘in_array’ having a null 2nd parameter, so I basically just shortcut the condition and only make that call if the variable ‘is not’ null.

    I also discovered that the output of the shortcode was ALWAYS being put at the top of the page content, and this was because the code uses ‘echo’ to output the html – rather than returning the html to be output by the shortcode.

    A file (bucket-browser-for-aws-s3/bucket-browser-for-aws-s3.php) with both fixes (well – worked for me) can be found here

    Hope this helps someone get their need over the line – as there still does’t appear to be any comparable plugin out there. This is a nice piece of work, and would be great if the author could pick it up again. Definitely has potential to make some money 🙂

    • This topic was modified 3 years, 4 months ago by mattsimner.
  • The topic ‘Solved: in_array() expects parameter 2 to be array + output before page content’ is closed to new replies.