Skip to content

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Oct 3, 2025

### Fixed Issues (if relevant)

- fixes #4964
@github-actions github-actions bot added the Component: Usa Relates to Mage_Usa label Oct 3, 2025
@sreichel sreichel added the bug label Oct 3, 2025
Removed obsolete error message for curl_strerror parameter type.
Copy link

sonarqubecloud bot commented Oct 3, 2025

@sreichel sreichel requested a review from Copilot October 3, 2025 06:19
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the UPS authentication shipping carrier where the curl_strerror() function was incorrectly receiving a cURL handle resource instead of an error code integer. The fix passes the error code obtained from curl_errno() to curl_strerror() instead of the cURL handle, which resolves a PHPStan type error and ensures proper error description retrieval.

Key Changes:

  • Corrected parameter type passed to curl_strerror() function
  • Removed corresponding PHPStan baseline entry for the resolved type error

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/code/core/Mage/Usa/Model/Shipping/Carrier/UpsAuth.php Fixed curl_strerror() function call to use error code instead of cURL handle
.phpstan.dist.baseline.neon Removed PHPStan baseline entry for the resolved type error

Copy link
Contributor

github-actions bot commented Oct 3, 2025

Test Results

811 tests  ±0   800 ✅ ±0   8s ⏱️ -1s
181 suites ±0    11 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit b9a83c8. ± Comparison against base commit 24cd60d.

♻️ This comment has been updated with latest results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]UPS Auth | Uncaught TypeError: curl_strerror(): Argument #1 ($error_code) must be of type int, CurlHandle given
2 participants