Skip to content

Commit

Permalink
Merge pull request #4995 from derrabus/bugfix/oci8-server-version
Browse files Browse the repository at this point in the history
Fix getServerVersion for OCI8 when assertions are disabled
  • Loading branch information
morozov committed Nov 15, 2021
2 parents fa27901 + f804b21 commit 821b4f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Driver/OCI8/Connection.php
Expand Up @@ -78,7 +78,8 @@ public function getServerVersion()
throw Error::new($this->dbh);
}

assert(preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches) === 1);
$result = preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches);
assert($result === 1);

return $matches[1];
}
Expand Down

0 comments on commit 821b4f0

Please sign in to comment.