Browse Source

Merge pull request #12 from jmross/master

When parsing response with regex, check resulting array of matches be…
tags/0.9.1
Coder 7 years ago
committed by GitHub
parent
commit
e27b509a34
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/Client.php

4
src/Client.php

@ -240,7 +240,7 @@ class Client implements Interfaces\ClientInterface
// If we have lines after current one
if (isset($response[$j])) {
$this->pregResponse($response[$j], $matches);
if (!empty($matches)) {
if (isset($matches[1][0], $matches[2][0])) {
$result['after'][$matches[1][0]] = $matches[2][0];
}
}
@ -248,7 +248,7 @@ class Client implements Interfaces\ClientInterface
break 2;
default:
$this->pregResponse($value, $matches);
if (!empty($matches)) {
if (isset($matches[1][0], $matches[2][0])) {
$result[$i][$matches[1][0]] = $matches[2][0];
}
break;

Loading…
Cancel
Save