Fix an illegal offset error message when adding a domain.

This commit is contained in:
Mark Crane
2013-05-22 01:02:11 +00:00
parent 6fff3b91a1
commit 6cf82027e7
+2
View File
@@ -259,11 +259,13 @@ include "root.php";
} }
//ensure the condition array uniform //ensure the condition array uniform
if (is_array($dialplan)) {
if (!is_array($dialplan['extension']['condition'][0])) { if (!is_array($dialplan['extension']['condition'][0])) {
$tmp = $dialplan['extension']['condition']; $tmp = $dialplan['extension']['condition'];
unset($dialplan['extension']['condition']); unset($dialplan['extension']['condition']);
$dialplan['extension']['condition'][0] = $tmp; $dialplan['extension']['condition'][0] = $tmp;
} }
}
//check if the dialplan app uuid exists //check if the dialplan app uuid exists
$this->app_uuid = $dialplan['extension']['@attributes']['app_uuid']; $this->app_uuid = $dialplan['extension']['@attributes']['app_uuid'];
if ($this->app_uuid_exists()) { if ($this->app_uuid_exists()) {