Title: Optional Sub Directory Problem
Last modified: July 20, 2018

---

# Optional Sub Directory Problem

 *  [sg83](https://wordpress.org/support/users/sg83/)
 * (@sg83)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/optional-sub-directory-problem/)
 * 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](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](https://wordpress.org/support/users/wvanbusk/)
 * (@wvanbusk)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/optional-sub-directory-problem/#post-10514803)
 * 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](https://wiki.php.net/rfc/is-countable)
 *  Thread Starter [sg83](https://wordpress.org/support/users/sg83/)
 * (@sg83)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/optional-sub-directory-problem/#post-10515384)
 * 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](https://wordpress.org/support/users/wvanbusk/)
 * (@wvanbusk)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/optional-sub-directory-problem/#post-10515421)
 * Looks like it, yes, according to [http://php.net/manual/en/migration72.incompatible.php](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.

 * ![](https://s.w.org/plugins/geopattern-icon/file-away_e3e2e1.svg)
 * [File Away](https://wordpress.org/plugins/file-away/)
 * [Support Threads](https://wordpress.org/support/plugin/file-away/)
 * [Active Topics](https://wordpress.org/support/plugin/file-away/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/file-away/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/file-away/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [wvanbusk](https://wordpress.org/support/users/wvanbusk/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/optional-sub-directory-problem/#post-10515421)
 * Status: not resolved