Skip to content

Commit 7e1073d

Browse files
committed
Inline the backslash pattern in token unescaping
The pattern matches a single literal backslash, so it can be written directly instead of being built with preg_quote() on every call.
1 parent d821bee commit 7e1073d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎packages/mysql-parser/src/class-wp-mysql-token.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,7 @@ public function get_value(): string {
176176
* Legacy multi-byte charsets like big5 or gbk, where a trail byte can be
177177
* a backslash, are not supported.
178178
*/
179-
$preg_quoted_backslash = preg_quote( $backslash );
180-
$value = preg_replace( "/$preg_quoted_backslash(.)/s", '$1', $value );
179+
$value = preg_replace( '/\\\\(.)/s', '$1', $value );
181180
}
182181
return $value;
183182
}

0 commit comments

Comments
 (0)