File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -213,10 +213,20 @@ protected function handleServerResponse($response) : array
213
213
if (isset ($ json_data ['rows ' ][0 ]['doc ' ])) {
214
214
// we have some data - extract the docs to return
215
215
$ docs = [];
216
- foreach ($ json_data [" rows " ] as $ document ) {
216
+ foreach ($ json_data [' rows ' ] as $ document ) {
217
217
$ docs [] = new Document ($ this , $ document ["doc " ]);
218
218
}
219
219
return $ docs ;
220
+ } elseif (isset ($ json_data ['rows ' ][0 ]['value ' ]['rev ' ])) {
221
+ // assume these are doc signposts
222
+ $ docs = [];
223
+ foreach ($ json_data ['rows ' ] as $ item ) {
224
+ $ doc = [];
225
+ $ doc ['id ' ] = $ item ['id ' ];
226
+ $ doc ['rev ' ] = $ item ['value ' ]['rev ' ];
227
+ $ docs [] = $ doc ;
228
+ }
229
+ return $ docs ;
220
230
} else {
221
231
// no docs, just return some basic info
222
232
return $ json_data ["rows " ];
You can’t perform that action at this time.
0 commit comments