Connection::errorCode() cannot return FALSE

parent 32dd9090
...@@ -222,11 +222,12 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection ...@@ -222,11 +222,12 @@ class OCI8Connection implements Connection, ServerInfoAwareConnection
public function errorCode() public function errorCode()
{ {
$error = oci_error($this->dbh); $error = oci_error($this->dbh);
if ($error !== false) { if ($error !== false) {
$error = $error['code']; return $error['code'];
} }
return $error; return null;
} }
/** /**
......
...@@ -190,7 +190,7 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection ...@@ -190,7 +190,7 @@ class SQLSrvConnection implements Connection, ServerInfoAwareConnection
return $errors[0]['code']; return $errors[0]['code'];
} }
return false; return null;
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment