You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/devices/devices_edit.inc.php
+3-3
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
$out['NO_NAV'] = 1;
15
15
}
16
16
17
-
if ($rec['LINKED_OBJECT'] != '') {
17
+
if (isset($rec['LINKED_OBJECT']) && $rec['LINKED_OBJECT'] != '') {
18
18
$object_rec = SQLSelectOne("SELECT ID FROM objects WHERE TITLE='" . $rec['LINKED_OBJECT'] . "'");
19
19
if ($object_rec['ID']) {
20
20
$properties = SQLSelect("SELECT pvalues.*, properties.TITLE as PROPERTY FROM pvalues LEFT JOIN properties ON properties.ID=pvalues.PROPERTY_ID WHERE pvalues.OBJECT_ID=" . $object_rec['ID'] . " AND pvalues.LINKED_MODULES!='' ORDER BY UPDATED DESC");
$methods = SQLSelect("SELECT methods.ID, methods.TITLE, classes.TITLE AS CLASS, objects.TITLE AS OBJECT, methods.CLASS_ID, methods.OBJECT_ID FROM methods LEFT JOIN classes ON methods.CLASS_ID=classes.ID LEFT JOIN objects ON methods.OBJECT_ID=objects.ID WHERE (methods.CODE LIKE '%" . DBSafe($k) . "%' OR methods.TITLE LIKE '" . DBSafe($v) . "')");
327
329
$total = count($methods);
328
330
for ($i = 0; $i < $total; $i++) {
329
-
if (!$found['method' . $methods[$i]['ID']]) {
331
+
if (!isset($found['method' . $methods[$i]['ID']])) {
330
332
$rec = array();
331
333
$rec['TYPE'] = 'method';
332
334
$rec['TITLE'] = $methods[$i]['TITLE'];
@@ -575,7 +577,7 @@ function admin(&$out)
575
577
$result = array();
576
578
577
579
foreach ($filesas$file_item) {
578
-
if ($file_item['SELECTED']) {
580
+
if (isset($file_item['SELECTED'])) {
579
581
$file = $file_item['TITLE'];
580
582
$filename = $path . '/' . $file;
581
583
if (file_exists($filename)) {
@@ -620,7 +622,7 @@ function admin(&$out)
620
622
foreach ($res_linesas$line) {
621
623
if (preg_match('/<b>(\d+?:\d+?:\d+?) ([\d\.]+)<\\/b>/uis', $line, $m)) {
0 commit comments