Skip to content
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

common.class.php #1132

Open
andy040670 opened this issue Jun 25, 2024 · 2 comments
Open

common.class.php #1132

andy040670 opened this issue Jun 25, 2024 · 2 comments

Comments

@andy040670
Copy link

В common.class.php в строке 597 опечатка:
$errorInfo = curl_strerror(curl_errno($ch));
Полагаю, что должно быть так:
$errorInfo = curl_strerror(curl_error($ch));

@whitevast
Copy link
Contributor

whitevast commented Jun 26, 2024

Нет, тут все правильно.
curl_error($ch) может НЕ выдавать описание при том, что curl_errno($ch) будет показывать код ошибки. Сам лично с этим столкнулся.
Согласно замечанию к curl_error() с php.net:
"curl_error is not a textual representation of curl_errno.
It's an actual error message.
If you want textual representation of error code, look for curl_strerror." в данной строке мы получаем описание кода ошибки curl_errno($ch).

@andy040670
Copy link
Author

Понятно, отстал от жизни.

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

No branches or pull requests

2 participants