Browse Source

Use is_array before foreach

FusionPBX 2 years ago
parent
commit
c858820d1c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      file_read.php

+ 1 - 1
file_read.php

@@ -82,7 +82,7 @@
 			$edit_directory = $_SESSION['switch']['conf']['dir'];
 			break;
 	}
-	if (!isset($edit_directory)) {
+	if (!isset($edit_directory) && is_array($_SESSION['editor']['path'])) {
 		foreach ($_SESSION['editor']['path'] as $path) {
 			if ($_SESSION["app"]["edit"]["dir"] == $path) {
 				$edit_directory = $path;