Skip to content

fix object of class CurlHadnle could not be converted to string issue #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TaylorChen
Copy link

@TaylorChen TaylorChen commented Sep 27, 2024

In the use of Ali cloud logging sdk docking log, found that the local will appear “Object of class CurlHandle could not be converted to string” error prompt, after some troubleshooting, found that in requestcore. class.php file will be encountered when the curl return to empty is false, at this time on the return of the curl_handle object for string conversion, in the conversion of the following error. But for the business code for this fatal error directly with the Exception can not be captured, which will affect the business operations, interrupt the business, from the point of view of the logging library on the exception handling, should not be directly converted to string Object.

"exception": "Error: Object of class CurlHandle could not be converted to string in /app/vendor/alibabacloud/aliyun-log-php-sdk/Aliyun/Log/requestcore.class.php:835\nStack trace:\n#0 /app/vendor/alibabacloud/aliyun-log-php-sdk/Aliyun/Log/Client.php(142): RequestCore->send_request()\n#1 /app/vendor/alibabacloud/aliyun-log-php-sdk/Aliyun/Log/Client.php(157):

It is suggested that when curl encounters a response of false, simply use only curl's own function to do something with the return handle, as in the submitted code change, and if there is a better way to do this feel free to point it out.

@CLAassistant
Copy link

CLAassistant commented Sep 27, 2024

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

2 participants