You should use IsArray to test whether you received a valid array or not. This procedure is recommended whenever you call a function that returns an array.
If $status = 200 Then
$array = _StringBetween($text, '<span class="d1">', "</span>")
If IsArray($array) Then
; process the array
Else
; handle the error
EndIf
EndIf