Skip to content

Commit

Permalink
Unable to create components items; fixes glpi-project#2172
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed May 9, 2017
1 parent cead309 commit 8c2451f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/item_devices.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -741,14 +741,14 @@ function addDevices($numberToAdd, $itemtype, $items_id, $devices_id, $input=arra
* @since version 0.85
**/
static function addDevicesFromPOST($input) {
if (!isset($input['devicetype']) || !$input['devicetype']) {
if (isset($input['devicetype']) && !$input['devicetype']) {
Session::addMessageAfterRedirect(
__('Please select a device type'),
false,
ERROR
);
return;
} else if (!isset($_POST['devices_id']) || !$_POST['devices_id']) {
} else if (isset($_POST['devices_id']) && !$_POST['devices_id']) {
Session::addMessageAfterRedirect(
__('Please select a device'),
false,
Expand Down

0 comments on commit 8c2451f

Please sign in to comment.