Support » Plugin: File Away » Optional Sub Directory Problem

  • sg83

    (@sg83)


    I’m trying out File Away for the first time, trying to get a shortcode entry working right. I can do a “Directory View” of one of my directories just fine, however, whenever I try and populate the “Optional Sub Directory” field to get it to auto display a sub folder instead of the main directory, it doesn’t work. If I check Apache logs I get this:

    [Fri Jul 20 15:55:27.093897 2018] [php7:warn] [pid 3656] [client x.x.x.x:56650] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/wp-content/plugins/file-away/lib/cls/class.fileaway.php on line 68, referer: http://testsite/index.php/training/training-videos/?drawer=training-content

    I tried searching for this particular error and didn’t come up with much. Any guidance would be much appreciated. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • wvanbusk

    (@wvanbusk)

    The new version of php has a function for testing if count() can be used there, the subfolder is not countable. https://wiki.php.net/rfc/is-countable

    sg83

    (@sg83)

    Sorry, I’m pretty green still when it comes to this stuff. Are you saying the new version of PHP made what I’m trying to accomplish not doable now in File Away?

    wvanbusk

    (@wvanbusk)

    Looks like it, yes, according to http://php.net/manual/en/migration72.incompatible.php. I might try fixing it and let you know what the deal is. Could be easy or hard to modify the php code to get it working. I assume count() might be made conditional depending on what’s in the parameter ($fcount = count($rawnames);) being counted. The author of this plugin has not touched it in three years.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Optional Sub Directory Problem’ is closed to new replies.