Skip to content

Commit 4a0c79a

Browse files
committed
Fix semantic change introduced by ed8f774
1 parent a39a1f6 commit 4a0c79a

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
@@ -158,8 +158,16 @@ protected function curl($requestMethod, $command, $parameters = null, $extraOpti
158158
}
159159

160160
$value = $this->offsetGet('value', $result);
161-
$message = $this->offsetGet('message', $result) ?: $this->offsetGet('message', $value);
162-
$error = $this->offsetGet('error', $result) ?: $this->offsetGet('error', $value);
161+
$message = $this->offsetGet('message', $result);
162+
$error = $this->offsetGet('error', $result);
163+
164+
if ($message === null) {
165+
$message = $this->offsetGet('message', $value);
166+
}
167+
168+
if ($error === null) {
169+
$error = $this->offsetGet('error', $value);
170+
}
163171

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

0 commit comments

Comments
 (0)