Skip to content

Commit 90c9349

Browse files
committed
fix
1 parent ce49782 commit 90c9349

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

system/Database/BaseConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ public function escape($str)
12381238
}
12391239

12401240
if (is_string($str) || (is_object($str) && method_exists($str, '__toString'))) {
1241-
if (is_object($str) && get_class($str) === RawSql::class) {
1241+
if (is_object($str) && basename(strtr(get_class($str), "\\", "/")) === basename(strtr(RawSql::class, "\\", "/"))) {
12421242
return $str->__toString();
12431243
}
12441244

system/Database/Postgre/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function escape($str)
182182
}
183183

184184
if (is_string($str) || (is_object($str) && method_exists($str, '__toString'))) {
185-
if (is_object($str) && get_class($str) === RawSql::class) {
185+
if (is_object($str) && basename(strtr(get_class($str), "\\", "/")) === basename(strtr(RawSql::class, "\\", "/"))) {
186186
return $str->__toString();
187187
}
188188

0 commit comments

Comments
 (0)