Skip to content

Commit b5e747f

Browse files
authored
fix(purge): prevent SQL query with 'true' on WHERE clause
1 parent 0eefeff commit b5e747f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CommonDBTM.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ public function cleanRelationData()
887887
foreach ($fields as $field) {
888888
if (is_array($field)) {
889889
// Relation based on 'itemtype'/'items_id' (polymorphic relationship)
890-
if ($this instanceof IPAddress && in_array('mainitemtype', $field) && in_array('mainitems_id', $field)) {
890+
if ($itemtype instanceof IPAddress && in_array('mainitemtype', $field) && in_array('mainitems_id', $field)) {
891891
// glpi_ipaddresses relationship that does not respect naming conventions
892892
$itemtype_field = 'mainitemtype';
893893
$items_id_field = 'mainitems_id';

0 commit comments

Comments
 (0)