Skip to content

Commit a66d7f1

Browse files
committed
Fix invalid characters passed to hexdec function
Backports phpmyadmin/sql-parser@dd1e775
1 parent 1111a33 commit a66d7f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wp-includes/sqlite/class-wp-sqlite-token.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ private function extract() {
261261
case self::TYPE_NUMBER:
262262
$ret = str_replace( '--', '', $this->token ); // e.g. ---42 === -42.
263263
if ( $this->flags & self::FLAG_NUMBER_HEX ) {
264+
$ret = str_replace( array( '-', '+' ), '', $this->token );
264265
if ( $this->flags & self::FLAG_NUMBER_NEGATIVE ) {
265-
$ret = str_replace( '-', '', $this->token );
266266
$ret = -hexdec( $ret );
267267
} else {
268268
$ret = hexdec( $ret );

0 commit comments

Comments
 (0)