Skip to content

Commit b30a75d

Browse files
committed
Disable tests that are now superfluous
* Simple binds: matchSimpleBinds() also handles the bind marker, and more elaborately: handles enclosing quotes, checks the number of markers… * Named binds: there just won't be replacements for matchNamedBinds() to make. As a difference, if there are no markers/placeholders, compileBinds() will return the original SQL string instead of null. So it's possible to use a query string without markers/placeholders, and a $binds array with superflous binds; not ideal, but not problematic either.
1 parent b5de102 commit b30a75d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

system/Database/Query.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,18 +288,14 @@ protected function compileBinds()
288288
}
289289

290290
if (is_numeric(key(array_slice($binds, 0, 1)))) {
291-
if (empty($this->bindMarker) || strpos($sql, $this->bindMarker) === false) {
291+
if (empty($this->bindMarker)) {
292292
return;
293293
}
294294

295295
$ml = strlen($this->bindMarker);
296296

297297
$this->finalQueryString = $this->matchSimpleBinds($sql, $binds, $bindCount, $ml);
298298
} else {
299-
if (! preg_match('/:(?!=).+:/', $sql)) {
300-
return;
301-
}
302-
303299
// Reverse the binds so that duplicate named binds
304300
// will be processed prior to the original binds.
305301
$binds = array_reverse($binds);

0 commit comments

Comments
 (0)