Use is_dir instead of check for the length of the stirng.
This commit is contained in:
parent
9217b599ed
commit
7b1a596d6f
|
|
@ -26,11 +26,9 @@
|
|||
|
||||
//process this only one time
|
||||
if ($domains_processed == 1) {
|
||||
if (isset($_SESSION['switch']['scripts']['dir'])) {
|
||||
$obj = new scripts;
|
||||
$obj->copy_files();
|
||||
$obj->write_config();
|
||||
}
|
||||
$obj = new scripts;
|
||||
$obj->copy_files();
|
||||
$obj->write_config();
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue