Skip to content

Commit ac5534b

Browse files
committed
Don't preg_match if subject is null
1 parent 988c52f commit ac5534b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function getRawResult()
241241

242242
public function getOrderUri()
243243
{
244-
if (preg_match('/^Location:\s+([^\n\r]+)/mi', $this->headers, $m)) {
244+
if ($this->headers && preg_match('/^Location:\s+([^\n\r]+)/mi', $this->headers, $m)) {
245245
return $m[1];
246246
}
247247
}

0 commit comments

Comments
 (0)