Skip to content

Commit

Permalink
Fix #18049 - Also check that curl_exec is enabled
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Mar 13, 2024
1 parent 85d1b2d commit 69f9172
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ phpMyAdmin - ChangeLog
- issue #15670 Fix case where the data is truncated after changing a longtext column's collation
- issue #18865 Fix missing text-nowrap for timestamps columns
- issue #19022 Fix case where tables from wrong database is loaded in navigation tree
- issue #18049 Also check that curl_exec is enabled for the new version check

5.2.1 (2023-02-07)
- issue #17522 Fix case where the routes cache file is invalid
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Plugins/Auth/AuthenticationCookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public function readCredentials(): bool

$captchaSiteVerifyURL = $GLOBALS['cfg']['CaptchaSiteVerifyURL'] ?? '';
$captchaSiteVerifyURL = empty($captchaSiteVerifyURL) ? null : $captchaSiteVerifyURL;
if (function_exists('curl_init')) {
if (function_exists('curl_init') && function_exists('curl_exec')) {
$reCaptcha = new ReCaptcha\ReCaptcha(
$GLOBALS['cfg']['CaptchaLoginPrivateKey'],
new ReCaptcha\RequestMethod\CurlPost(null, $captchaSiteVerifyURL)
Expand Down
2 changes: 1 addition & 1 deletion libraries/classes/Utils/HttpRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function create(
$content = null,
$header = ''
) {
if (function_exists('curl_init')) {
if (function_exists('curl_init') && function_exists('curl_exec')) {
return $this->curl($url, $method, $returnOnlyStatus, $content, $header);
}

Expand Down

1 comment on commit 69f9172

@joho1968
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a better solution I think. Well spotted.

Please sign in to comment.