Commit 3db6f27
authored
feature #1132 Fix type error in ResultPager::fetch (nunoplopes)
This PR was merged into the 3.14-dev branch.
Discussion
----------
When using etags, the reply from github may be empty and the underlying APIs will return an empty string. We need to flip those to empty arrays.
e.g.:
```php
$github_builder
->addPlugin(new Http\Client\Common\Plugin\HeaderSetPlugin([
'If-None-Match' => $etag,
]));
$api = $github_client->user('user');
$paginator = new \Github\ResultPager($github_client);
$data = $paginator->fetch($api, 'events', [$username]);
// $data should be [] if $etag is the latest
```
Commits
-------
773747a Fix type error in ResultPager::fetchFile tree
2 files changed
+25
-1
lines changed- lib/Github
- test/Github/Tests
2 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
179 | 203 | | |
180 | 204 | | |
181 | 205 | | |
| |||
0 commit comments