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
213213 if (isset ($ json_data ['rows ' ][0 ]['doc ' ])) {
214214 // we have some data - extract the docs to return
215215 $ docs = [];
216- foreach ($ json_data [" rows " ] as $ document ) {
216+ foreach ($ json_data [' rows ' ] as $ document ) {
217217 $ docs [] = new Document ($ this , $ document ["doc " ]);
218218 }
219219 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 ;
220230 } else {
221231 // no docs, just return some basic info
222232 return $ json_data ["rows " ];
You can’t perform that action at this time.
0 commit comments