Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/Database/SQLSRV/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function connect(bool $persistent = false)
$errors = [];

foreach (sqlsrv_errors(SQLSRV_ERR_ERRORS) as $error) {
$errors[] = preg_replace('/(\[.+\]\[.+\](?:\[.+\])?)(.+)/', '$2', $error['message']);
$errors[] = (string) preg_replace('/(\[.+\]\[.+\](?:\[.+\])?)(.+)/', '$2', $error['message']);
}

throw new DatabaseException(implode("\n", $errors));
Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/CURLRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ protected function setResponseHeaders(array $headers = [])
}

if (isset($matches[2])) {
$this->response->setStatusCode($matches[2], $matches[3] ?? null);
$this->response->setStatusCode((int) $matches[2], $matches[3] ?? null);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion system/Helpers/text_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ function increment_string(string $str, string $separator = '_', int $first = 1):
{
preg_match('/(.+)' . preg_quote($separator, '/') . '([0-9]+)$/', $str, $match);

return isset($match[2]) ? $match[1] . $separator . ($match[2] + 1) : $str . $separator . $first;
return isset($match[2]) ? $match[1] . $separator . ((int) $match[2] + 1) : $str . $separator . $first;
}
}

Expand Down
2 changes: 1 addition & 1 deletion system/Session/Handlers/MemcachedHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function open($path, $name): bool
continue;
}

if (! $this->memcached->addServer($match[1], $match[2], $match[3] ?? 0)) {
if (! $this->memcached->addServer($match[1], (int) $match[2], $match[3] ?? 0)) {
$this->logger->error('Could not add ' . $match[1] . ':' . $match[2] . ' to Memcached server pool.');
} else {
$serverList[] = $match[1] . ':' . $match[2];
Expand Down