From c099f638fc0ed1bf264a4810fb2c5cd36dfa3392 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Sat, 21 Nov 2015 13:28:22 +0100 Subject: Do not produce warnings when registrations file does not exist --- config/siproxd/siproxd_registered_phones.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'config/siproxd') diff --git a/config/siproxd/siproxd_registered_phones.php b/config/siproxd/siproxd_registered_phones.php index 0648aa2f..429b5338 100644 --- a/config/siproxd/siproxd_registered_phones.php +++ b/config/siproxd/siproxd_registered_phones.php @@ -40,8 +40,10 @@ require_once("guiconfig.inc"); -$phonetext = file_get_contents("/var/siproxd/siproxd_registrations"); -$phonedata = explode("\n", $phonetext); +if (file_exists("/var/siproxd/siproxd_registrations")) { + $phonetext = file_get_contents("/var/siproxd/siproxd_registrations"); + $phonedata = explode("\n", $phonetext); +} if (!is_array($phonedata)) { $phonedata = array(); -- cgit v1.2.3