Skip to content

Commit 98cfc64

Browse files
kamil-tekielaMauricioFauth
authored andcommitted
Remove escapeString from Relation
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent d76b240 commit 98cfc64

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

libraries/classes/ConfigStorage/Relation.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,13 +1055,16 @@ public function getForeignData(
10551055
. '.' . Util::backquote($foreign_table);
10561056
$f_query_filter = $foreign_filter === '' ? '' : ' WHERE '
10571057
. Util::backquote($foreign_field)
1058-
. ' LIKE "%' . $this->dbi->escapeString($foreign_filter) . '%"'
1058+
. ' LIKE ' . $this->dbi->quoteString(
1059+
'%' . $this->dbi->escapeMysqlWildcards($foreign_filter) . '%'
1060+
)
10591061
. (
10601062
$foreign_display === false
10611063
? ''
10621064
: ' OR ' . Util::backquote($foreign_display)
1063-
. ' LIKE "%' . $this->dbi->escapeString($foreign_filter)
1064-
. '%"'
1065+
. ' LIKE ' . $this->dbi->quoteString(
1066+
'%' . $this->dbi->escapeMysqlWildcards($foreign_filter) . '%'
1067+
)
10651068
);
10661069
$f_query_order = $foreign_display === false ? '' : ' ORDER BY '
10671070
. Util::backquote($foreign_table) . '.'

psalm-baseline.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,10 +731,6 @@
731731
</PossiblyInvalidCast>
732732
</file>
733733
<file src="libraries/classes/ConfigStorage/Relation.php">
734-
<DeprecatedMethod occurrences="2">
735-
<code>escapeString</code>
736-
<code>escapeString</code>
737-
</DeprecatedMethod>
738734
<InvalidArgument occurrences="1">
739735
<code>usort($tables, 'strnatcasecmp')</code>
740736
</InvalidArgument>

0 commit comments

Comments
 (0)