Explorar el Código

Use is_array before foreach

FusionPBX hace 2 años
padre
commit
c858820d1c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      file_read.php

+ 1 - 1
file_read.php

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