Skip to content

Commit 6fc747a

Browse files
committed
Fix semantic change introduced by 9fef2b7
1 parent 8784d1e commit 6fc747a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lib/WebDriver/AbstractWebDriver.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,16 @@ protected function curl($requestMethod, $command, $parameters = null, $extraOpti
206206
}
207207

208208
$value = $this->offsetGet('value', $result);
209-
$message = $this->offsetGet('message', $result) ?: $this->offsetGet('message', $value);
210-
$error = $this->offsetGet('error', $result) ?: $this->offsetGet('error', $value);
209+
$message = $this->offsetGet('message', $result);
210+
$error = $this->offsetGet('error', $result);
211+
212+
if ($message === null) {
213+
$message = $this->offsetGet('message', $value);
214+
}
215+
216+
if ($error === null) {
217+
$error = $this->offsetGet('error', $value);
218+
}
211219

212220
// if not success, throw exception
213221
if (isset($result['status']) && (int) $result['status'] !== 0) {

0 commit comments

Comments
 (0)