updae
This commit is contained in:
@@ -408,7 +408,7 @@ $mm->registerFunction($moduleName, 'alpha_vantage_request', static function (
|
||||
$responseBody = curl_exec($ch);
|
||||
$curlError = curl_error($ch);
|
||||
$httpCode = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ final class FxRatesService
|
||||
$response = curl_exec($ch);
|
||||
$httpStatus = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
$curlError = curl_error($ch);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
if ($response === false || $curlError !== '' || $httpStatus >= 400) {
|
||||
$payload = is_string($response) ? json_decode($response, true) : null;
|
||||
|
||||
@@ -414,7 +414,7 @@ final class FxService
|
||||
$response = curl_exec($ch);
|
||||
$httpStatus = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
$curlError = curl_error($ch);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
$this->debug?->add('fx.latest.response', [
|
||||
'http_status' => $httpStatus,
|
||||
@@ -461,7 +461,7 @@ final class FxService
|
||||
$httpStatus = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
$headerSize = (int) curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$curlError = curl_error($ch);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
$rawHeaders = is_string($response) ? substr($response, 0, $headerSize) : '';
|
||||
$body = is_string($response) ? substr($response, $headerSize) : '';
|
||||
@@ -507,7 +507,7 @@ final class FxService
|
||||
$response = curl_exec($ch);
|
||||
$httpStatus = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
$curlError = curl_error($ch);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
$this->debug?->add('fx.currencies.response', [
|
||||
'http_status' => $httpStatus,
|
||||
@@ -562,7 +562,7 @@ final class FxService
|
||||
$httpStatus = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
$headerSize = (int) curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||
$curlError = curl_error($ch);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
$rawHeaders = is_string($response) ? substr($response, 0, $headerSize) : '';
|
||||
$body = is_string($response) ? substr($response, $headerSize) : '';
|
||||
|
||||
@@ -182,7 +182,7 @@ final class OcrService
|
||||
$response = curl_exec($ch);
|
||||
$curlError = curl_error($ch);
|
||||
$httpStatus = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
if ($response === false || $curlError !== '') {
|
||||
return [
|
||||
|
||||
@@ -168,7 +168,7 @@ $httpRequest = function (string $method, string $url, array $headers, ?string $b
|
||||
$error = curl_error($ch);
|
||||
}
|
||||
$httpCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
} else {
|
||||
$ctx = stream_context_create([
|
||||
'http' => [
|
||||
|
||||
@@ -32,7 +32,7 @@ $httpRequest = static function (string $method, string $url, array $headers, ?st
|
||||
$requestError = curl_error($ch);
|
||||
}
|
||||
$httpCode = (int)curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
} else {
|
||||
$ctx = stream_context_create([
|
||||
'http' => [
|
||||
|
||||
@@ -486,7 +486,7 @@ final class CronManagementService
|
||||
$raw = curl_exec($ch);
|
||||
$status = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
$error = curl_error($ch);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
if (!is_string($raw)) {
|
||||
throw new \RuntimeException($error !== '' ? $error : 'Cron-HTTP-Aufruf fehlgeschlagen.');
|
||||
|
||||
@@ -536,7 +536,7 @@ final class KeycloakAuth
|
||||
$raw = curl_exec($ch);
|
||||
$curlError = curl_error($ch);
|
||||
$statusCode = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
if ($raw === false) {
|
||||
return [
|
||||
|
||||
@@ -720,7 +720,18 @@ final class LdapProvisioner
|
||||
throw new RuntimeException('LDAP_HOST ist nicht gesetzt.');
|
||||
}
|
||||
|
||||
$link = ldap_connect($host, $port);
|
||||
$uri = preg_match('~^ldaps?://~i', $host) === 1
|
||||
? $host
|
||||
: 'ldap://' . $host;
|
||||
$uriParts = parse_url($uri);
|
||||
if (!is_array($uriParts) || !isset($uriParts['host'])) {
|
||||
throw new RuntimeException('LDAP_HOST ist keine gueltige LDAP-URI oder Hostangabe.');
|
||||
}
|
||||
if (!isset($uriParts['port'])) {
|
||||
$uri = rtrim($uri, '/') . ':' . $port;
|
||||
}
|
||||
|
||||
$link = ldap_connect($uri);
|
||||
|
||||
if ($link === false) {
|
||||
throw new RuntimeException('LDAP-Verbindung konnte nicht aufgebaut werden.');
|
||||
|
||||
1
start.md
1
start.md
@@ -1,4 +1,3 @@
|
||||
# Start
|
||||
|
||||
Zentrale Einstiegsdatei fuer neue Chats und neue Arbeitsauftraege in `desktop.kusche.berlin`.
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ final class GiteaDeployStatusService
|
||||
$raw = curl_exec($ch);
|
||||
$status = (int) curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
|
||||
$error = curl_error($ch);
|
||||
curl_close($ch);
|
||||
unset($ch);
|
||||
|
||||
if (!is_string($raw)) {
|
||||
throw new \RuntimeException($error !== '' ? $error : 'Leere Gitea-Antwort.');
|
||||
|
||||
Reference in New Issue
Block a user