Use is_dir instead of check for the length of the stirng.

This commit is contained in:
markjcrane
2016-04-03 09:36:27 -06:00
parent 1bfbbdb262
commit 194dccfd93
2 changed files with 4 additions and 6 deletions

View File

@@ -99,7 +99,7 @@ class scripts {
* Writes the config.lua
*/
public function write_config() {
if (strlen($_SESSION['switch']['scripts']['dir']) > 0) {
if (is_dir($_SESSION['switch']['scripts']['dir'])) {
//define the global variables
global $db;