Selaa lähdekoodia

Use is_array before using foreach

FusionPBX 2 vuotta sitten
vanhempi
commit
475cfb4350
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      file_save.php

+ 1 - 1
file_save.php

@@ -95,7 +95,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;