Skip to content

Commit

Permalink
Fixing deprecation warnings in client
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasmiller committed Jul 7, 2022
1 parent 5a46f01 commit f74b3a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
name: PHP ${{ matrix.php }} tests
strategy:
matrix:
php: [7.2, 7.3, 7.4, 8.0]
php: [7.2, 7.3, 7.4, 8.0, 8.1]
steps:
- uses: actions/checkout@v3
- name: Setup PHP
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/http_adapter.php
Expand Up @@ -36,7 +36,7 @@ public function execute($method, $url, $body, $headers): array
]
);
// The Content-Length header is required by Recurly API infrastructure
$headers['Content-Length'] = strlen($body);
$headers['Content-Length'] = is_null($body) ? 0 : strlen($body);
$headers_str = "";
foreach ($headers as $k => $v) {
$headers_str .= "$k: $v\r\n";
Expand Down
4 changes: 2 additions & 2 deletions lib/recurly/pager.php
Expand Up @@ -104,10 +104,10 @@ public function current(): \Recurly\RecurlyResource
* Implementation of the Iterator interfaces `key` method.
* Will return NULL for every iteration.
*
* @return void
* @return mixed
* @codeCoverageIgnore
*/
public function key(): void
public function key(): mixed
{
//NOOP
}
Expand Down

0 comments on commit f74b3a9

Please sign in to comment.