Commit 4b0a98a
committed
Allow native token stream in trait constructor
The SQLite driver passes a WP_MySQL_Native_Token_Stream object as the
$tokens argument when the extension is loaded; pre-PR this worked
because the parent class was the Rust WP_MySQL_Native_Parser, which
accepts either an array or the stream object. The trait's constructor
needs the same flexibility — drop the array typehint and pass an empty
array to WP_Parser::__construct, whose tokens/position state is inert
in native mode.1 parent 26638ce commit 4b0a98a
1 file changed
Lines changed: 15 additions & 3 deletions
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
28 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
29 | 41 | | |
30 | 42 | | |
31 | 43 | | |
| |||
0 commit comments