mirror of
https://github.com/dg/dibi.git
synced 2025-08-12 09:04:24 +02:00
implemented PCRE error checking and PcreException
This commit is contained in:
@@ -175,6 +175,8 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
$res = array();
|
||||
preg_match_all('#(.+?): +(\d+) *#', mysql_info($this->connection), $matches, PREG_SET_ORDER);
|
||||
if (preg_last_error()) throw new PcreException;
|
||||
|
||||
foreach ($matches as $m) {
|
||||
$res[$m[1]] = (int) $m[2];
|
||||
}
|
||||
|
@@ -159,6 +159,8 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
||||
{
|
||||
$res = array();
|
||||
preg_match_all('#(.+?): +(\d+) *#', mysqli_info($this->connection), $matches, PREG_SET_ORDER);
|
||||
if (preg_last_error()) throw new PcreException;
|
||||
|
||||
foreach ($matches as $m) {
|
||||
$res[$m[1]] = (int) $m[2];
|
||||
}
|
||||
|
Reference in New Issue
Block a user