iamport / iamport-rest-client-php

PHP사용자를 위한 아임포트 REST API 연동 모듈입니다
MIT License
18 stars 24 forks source link

PHP8 deprecation Exception for http_build_query #8

Open ghost opened 2 years ago

ghost commented 2 years ago

안녕하세요.

PHP8에서 아래의 오류가 발생합니다.

`ErrorException: http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated in I:\work\decafe\src\decapet_py_sync\server\vendor\guzzlehttp\guzzle\src\Client.php: 446 Stack trace:

0 [internal function

]: CodeIgniter\Debug\Exceptions->errorHandler(8192, 'http_build_quer...', 'I:\work\decafe\...', 446)

1 I:\work\decafe\src\decapet_py_sync\server\vendor\guzzlehttp\guzzle\src\Client.php(446): http_build_query(Array, NULL, '&',

2)

2 I:\work\decafe\src\decapet_py_sync\server\vendor\guzzlehttp\guzzle\src\Client.php(346): GuzzleHttp\Client->applyOptions(Object(GuzzleHttp\Psr7\Request), Array)

3 I:\work\decafe\src\decapet_py_sync\server\vendor\guzzlehttp\guzzle\src\Client.php(162): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)

4 I:\work\decafe\src\decapet_py_sync\server\vendor\guzzlehttp\guzzle\src\Client.php(182): GuzzleHttp\Client->requestAsync('GET', Object(GuzzleHttp\Psr7\Uri), Array)

5 I:\work\decafe\src\decapet_py_sync\server\vendor\iamport\rest-client\src\Iamport.php(103): GuzzleHttp\Client->request('GET', '/payments/find/...', Array)

6 I:\work\decafe\src\decapet_py_sync\server\vendor\iamport\rest-client\src\Iamport.php(53): Iamport\RestClient\Iamport->request('GET', '/payments/find/...', Array, NULL)

7 I:\work\decafe\src\decapet_py_sync\server\app\Controllers\Api\Pay.php(90): Iamport\RestClient\Iamport->callApi(Object(Iamport\RestClient\Request\Payment))

8 I:\work\decafe\src\decapet_py_sync\server\vendor\codeigniter4\framework\system\CodeIgniter.php(832): App\Controllers\Api\Pay->complete()

9 I:\work\decafe\src\decapet_py_sync\server\vendor\codeigniter4\framework\system\CodeIgniter.php(419): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\Api\Pay))

10 I:\work\decafe\src\decapet_py_sync\server\vendor\codeigniter4\framework\system\CodeIgniter.php(326): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)

11 I:\work\decafe\src\decapet_py_sync\server\public\index.php(37): CodeIgniter\CodeIgniter->run()

12 {main

}{`

ghost commented 2 years ago

guzzlehttp\guzzle\src\Client.php

445 $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986); change to $value = http_build_query($value, '', '&', PHP_QUERY_RFC3986); // php8 fix