Версия Битрикс24: 24.0.300
Некорректное поведение метода \Bitrix\Main\Web\HttpClient::sendRequest, строка 936.
Вот что говорит PHPStan:
Т.е. при передаче в sendRequest любого $request, имплементирующего RequestInterface, но не являющегося и не расширяющего \Bitrix\Main\Web\Http\Request, вызывает ошибку:
Некорректное поведение метода \Bitrix\Main\Web\HttpClient::sendRequest, строка 936.
Вот что говорит PHPStan:
| Цитата |
|---|
| Incompatible types: Expected property of type '\Bitrix\Main\Web\Http\Request|null', '\Psr\Http\Message\RequestInterface' provided |
Т.е. при передаче в sendRequest любого $request, имплементирующего RequestInterface, но не являющегося и не расширяющего \Bitrix\Main\Web\Http\Request, вызывает ошибку:
| Код |
|---|
object(TypeError)#293 (7) {
["message":protected]=>
string(124) "Cannot assign GuzzleHttp\Psr7\Request to property Bitrix\Main\Web\HttpClient::$request of type ?Bitrix\Main\Web\Http\Request"
["string":"Error":private]=>
string(0) ""
["code":protected]=>
int(0)
["file":protected]=>
string(74) "/var/www/html/deploy/shared/src/bitrix/modules/main/lib/web/httpclient.php"
["line":protected]=>
int(936)
["trace":"Error":private]=>
array(2) {
[0]=>
array(5) {
["file"]=>
string(96) "/var/www/html/deploy/releases/4/src/local/php_interface/include/Services/SOME_SERVICE.php"
["line"]=>
int(81)
["function"]=>
string(11) "sendRequest"
["class"]=>
string(26) "Bitrix\Main\Web\HttpClient"
["type"]=>
string(2) "->"
}
[1]=>
array(5) {
["file"]=>
string(60) "/var/www/html/deploy/releases/4/src/EXAMPLE/index.php"
["line"]=>
int(19)
["function"]=>
string(9) "getReport"
["class"]=>
string(41) "Services\SOME_SERVICE"
["type"]=>
string(2) "->"
}
}
["previous":"Error":private]=>
NULL
}
|
У Битрикса есть система контроля версий?