File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,13 @@ private function addResponse(ResponseInterface $response)
132132 {
133133 $ this ->index = 0 ;
134134 $ this ->isComplete = $ response ->getType () === ResponseType::SUCCESS_SEQUENCE ;
135- $ this ->size = $ response ->isAtomic () ? 1 : \count ($ response ->getData ());
135+
136+ if (\is_null ($ response ->getData ())) {
137+ $ this ->size = 0 ;
138+ } else {
139+ $ this ->size = $ response ->isAtomic () ? 1 : \count ($ response ->getData ());
140+ }
141+
136142 $ this ->response = $ response ;
137143 }
138144
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public function getData()
8282 */
8383 public function isAtomic (): bool
8484 {
85- return \is_string ($ this ->data ) || \ count ($ this ->data ) === 1 ;
85+ return \is_string ($ this ->data ) || (! \is_null ( $ this -> data ) && \ count ($ this ->data ) === 1 ) ;
8686 }
8787
8888 /**
You can’t perform that action at this time.
0 commit comments