Skip to content

Commit dc45e42

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.6
2 parents b45f151 + c326cd1 commit dc45e42

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

system/Database/BaseBuilder.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3169,21 +3169,27 @@ protected function compileWhereHaving(string $qbKey): string
31693169
);
31703170

31713171
foreach ($conditions as &$condition) {
3172-
if (($op = $this->getOperator($condition)) === false
3173-
|| ! preg_match('/^(\(?)(.*)(' . preg_quote($op, '/') . ')\s*(.*(?<!\)))?(\)?)$/i', $condition, $matches)
3172+
$op = $this->getOperator($condition);
3173+
if (
3174+
$op === false
3175+
|| ! preg_match(
3176+
'/^(\(?)(.*)(' . preg_quote($op, '/') . ')\s*(.*(?<!\)))?(\)?)$/i',
3177+
$condition,
3178+
$matches
3179+
)
31743180
) {
31753181
continue;
31763182
}
3177-
// $matches = array(
3178-
// 0 => '(test <= foo)', /* the whole thing */
3179-
// 1 => '(', /* optional */
3180-
// 2 => 'test', /* the field name */
3181-
// 3 => ' <= ', /* $op */
3182-
// 4 => 'foo', /* optional, if $op is e.g. 'IS NULL' */
3183-
// 5 => ')' /* optional */
3184-
// );
3185-
3186-
if (isset($matches[4]) && $matches[4] !== '' && $matches[4] !== '0') {
3183+
// $matches = [
3184+
// 0 => '(test <= foo)', /* the whole thing */
3185+
// 1 => '(', /* optional */
3186+
// 2 => 'test', /* the field name */
3187+
// 3 => ' <= ', /* $op */
3188+
// 4 => 'foo', /* optional, if $op is e.g. 'IS NULL' */
3189+
// 5 => ')' /* optional */
3190+
// ];
3191+
3192+
if (isset($matches[4]) && $matches[4] !== '') {
31873193
$protectIdentifiers = false;
31883194
if (str_contains($matches[4], '.')) {
31893195
$protectIdentifiers = true;

system/Router/Router.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function __construct(RouteCollectionInterface $routes, ?Request $request
183183
}
184184

185185
/**
186-
* Finds the controller method corresponding to the URI.
186+
* Finds the controller corresponding to the URI.
187187
*
188188
* @param string|null $uri URI path relative to baseURL
189189
*
@@ -243,7 +243,7 @@ public function getFilters(): array
243243
}
244244

245245
/**
246-
* Returns the name of the matched controller.
246+
* Returns the name of the matched controller or closure.
247247
*
248248
* @return (Closure(mixed...): (ResponseInterface|string|void))|string Controller classname or Closure
249249
*/
@@ -256,7 +256,7 @@ public function controllerName()
256256

257257
/**
258258
* Returns the name of the method to run in the
259-
* chosen container.
259+
* chosen controller.
260260
*/
261261
public function methodName(): string
262262
{

0 commit comments

Comments
 (0)