diff options
-rw-r--r-- | etc/inc/interfaces.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 83ab0c8..9a23e20 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1152,7 +1152,8 @@ function interface_bring_down($interface = "wan", $destroy = false) { break; } - $old_router = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router")); + if (file_exists("{$g['tmp_path']}/{$realif}_router")) + $old_router = trim(file_get_contents("{$g['tmp_path']}/{$realif}_router")); // log_error("Checking for old router states: {$g['tmp_path']}/{$realif}_router = {$old_router}"); if (!empty($old_router)) { log_error("Clearing states to old gateway {$old_router}."); |