Title: Fix PHP bug in variable check
Last modified: March 6, 2020

---

# Fix PHP bug in variable check

 *  Resolved [marco1958](https://wordpress.org/support/users/marco1958/)
 * (@marco1958)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/)
 * Warning: Invalid argument supplied for foreach() in simple-file-list/ee-simple-
   file-list.php on line 93
 * Please check before use. Change the code code to:
 *  // Loop thru and set up
    if(is_array($eeSFL_Extensions) && count($eeSFL_Extensions)
   >0) foreach($eeSFL_Extensions as $key => $eeSFL_Extension) {
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffix-php-bug-in-variable-check%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Mitchell Bennis](https://wordpress.org/support/users/eemitch/)
 * (@eemitch)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/#post-12516169)
 * $eeSFL_Extensions is a hard-coded array. I’m not sure how it could be invalid
   unless there have been changes to the code.
 *  Thread Starter [marco1958](https://wordpress.org/support/users/marco1958/)
 * (@marco1958)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/#post-12519901)
 * Mitchell, can running the wp cli be the cause?
 * Shall I force reinstall the plug-in and see if I can reproduce the error?
 * If I’m the only one, our environment is most likely the cause. In can take a 
   few minutes to debug (see what a trace reveals).
 *  Plugin Author [Mitchell Bennis](https://wordpress.org/support/users/eemitch/)
 * (@eemitch)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/#post-12519911)
 * I don’t think so. This error should not be possible. Please delete the plugin
   and re-download it.
 *  Thread Starter [marco1958](https://wordpress.org/support/users/marco1958/)
 * (@marco1958)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/#post-12522763)
 * Deactivated, deleted, installed 4.1.3.zip. This shows:
 *  There has been a critical error on your website.
    Please check your site admin
   email inbox for instructions.
 * Error pops up again:
 *  $ wp user list
    Warning: Invalid argument supplied for foreach() in ee-simple-
   file-list.php on line 93 +—-+————+————–+————–+————–+—————+ | ID | user_login 
   | display_name | user_email | user_registe | roles | | | | | | red | |
 *  Plugin Author [Mitchell Bennis](https://wordpress.org/support/users/eemitch/)
 * (@eemitch)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/#post-12525493)
 * It appears then that plugin is not command line compatible.
 *  Thread Starter [marco1958](https://wordpress.org/support/users/marco1958/)
 * (@marco1958)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/#post-12526613)
 * Ok thanks, I will advise the site owner to find an alternative plug-in.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Fix PHP bug in variable check’ is closed to new replies.

 * ![](https://ps.w.org/simple-file-list/assets/icon-256x256.png?rev=1330838)
 * [Simple File List](https://wordpress.org/plugins/simple-file-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-file-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-file-list/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-file-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-file-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-file-list/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [marco1958](https://wordpress.org/support/users/marco1958/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/fix-php-bug-in-variable-check/#post-12526613)
 * Status: resolved