refactor: Use elseif instead of else if (#8417)

This commit is contained in:
Tony Murray
2018-03-19 16:40:17 -05:00
committed by Neil Lathwood
parent 10237ea097
commit 8cc8eb8dd2
13 changed files with 27 additions and 27 deletions

View File

@@ -40,7 +40,7 @@ if (is_admin() === false) {
foreach ($_POST['parent_ids'] as $parent) {
if (is_numeric($parent) && $parent != 0) {
$insert[] = array('parent_device_id' => $parent, 'child_device_id' => $dev);
} else if ($parent == 0) {
} elseif ($parent == 0) {
// In case we receive a mixed array with $parent = 0 (which shouldn't happen)
// Empty the insert array so we remove any previous dependency so 'None' takes precedence
$insert = array();