How to fix
Replace the line:
with the following one:
'total' => isset($rawResponse['total']) ? $rawResponse['total'] : 0
Replace the line:
with the following one:
'total' => isset($rawResponse['total']) ? $rawResponse['total'] : 0