diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php
index 56681a8a03..4766f6d833 100644
--- a/app/extensions/extension_edit.php
+++ b/app/extensions/extension_edit.php
@@ -72,7 +72,7 @@
}
//get the http values and set them as php variables
- if (!empty($_POST) && count($_POST) > 0) {
+ if (!empty($_POST)) {
//get the values from the HTTP POST and save them as PHP variables
if ($action == 'add' || permission_exists("extension_extension")) {
@@ -281,7 +281,7 @@
}
//process the user data and save it to the database
- if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
+ if (!empty($_POST) && empty($_POST["persistformvar"])) {
//set the domain_uuid
if (permission_exists('extension_domain') && is_uuid($_POST["domain_uuid"])) {
@@ -388,10 +388,8 @@
}
//prepare the values for mwi account
- if (!empty($mwi_account)) {
- if (strpos($mwi_account, '@') === false) {
- $mwi_account .= "@".$_SESSION['domain_name'];
- }
+ if (!empty($mwi_account) && strpos($mwi_account, '@') === false) {
+ $mwi_account .= "@".$_SESSION['domain_name'];
}
//generate a password
@@ -817,7 +815,7 @@
}
//pre-populate the form
- if (count($_GET) > 0 && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) {
+ if (!empty($_GET) && (empty($_POST["persistformvar"]) || $_POST["persistformvar"] != "true")) {
$extension_uuid = $_GET["id"];
$sql = "select * from v_extensions ";
$sql .= "where extension_uuid = :extension_uuid ";
@@ -1418,21 +1416,16 @@
echo "\n";
echo "
\n";
if (permission_exists('outbound_caller_id_select')) {
- if (count($destinations) > 0) {
+ if (!empty($destinations)) {
echo "
\n";
echo "
\n";
if (permission_exists('outbound_caller_id_select')) {
- if (count($destinations) > 0) {
+ if (!empty($destinations)) {
echo "
\n";
echo "
\n";
if (permission_exists('emergency_caller_id_select')) {
- if (count($emergency_destinations) > 0) {
+ if (!empty($emergency_destinations)) {
echo "
\n";
echo "
\n";
if (permission_exists('emergency_caller_id_select')) {
- if (count($emergency_destinations) > 0) {
+ if (!empty($emergency_destinations)) {
echo "