fix object of class CurlHadnle could not be converted to string issue #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.