Skip to content

Commit

Permalink
Request handler patch.
Browse files Browse the repository at this point in the history
Changelog excerpt:
- Added a guard to the request handler's request method to fail if
  curl_init doesn't exist.
  • Loading branch information
Maikuolan committed Aug 2, 2024
1 parent b42003d commit 4edfc4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ found at:
at once, or to determine the keys to use to convert corresponding flow
sequences in values to flow maps).

- [2024.08.02; Maikuolan]: Added a guard to the request handler's request
method to fail if curl_init doesn't exist.

=== Version/Release 2.12.1 ===
PATCH RELEASE.

Expand Down
7 changes: 6 additions & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Request handler (last modified: 2023.12.24).
* Request handler (last modified: 2024.08.02).
*
* This file is a part of the "common classes package", utilised by a number of
* packages and projects, including CIDRAM and phpMussel.
Expand Down Expand Up @@ -106,6 +106,11 @@ public function __destruct()
*/
public function request(string $URI, $Params = [], int $Timeout = -1, array $Headers = [], int $Depth = 0, string $Method = ''): string
{
/** Guard. */
if (!function_exists('curl_init')) {
return '';
}

/** Test channel triggers. */
foreach ($this->Channels['Triggers'] as $TriggerName => $TriggerURI) {
if (
Expand Down

0 comments on commit 4edfc4d

Please sign in to comment.