mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 13:47:33 +02:00
PcreException renamed to DibiPcreException
This commit is contained in:
@@ -44,8 +44,7 @@ if (!defined('NETTE')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @package exceptions */
|
class DibiPcreException extends Exception {
|
||||||
class PcreException extends Exception {
|
|
||||||
|
|
||||||
public function __construct($message = '%msg.')
|
public function __construct($message = '%msg.')
|
||||||
{
|
{
|
||||||
|
@@ -178,7 +178,7 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver, IDibiResultDriv
|
|||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
preg_match_all('#(.+?): +(\d+) *#', mysql_info($this->connection), $matches, PREG_SET_ORDER);
|
preg_match_all('#(.+?): +(\d+) *#', mysql_info($this->connection), $matches, PREG_SET_ORDER);
|
||||||
if (preg_last_error()) throw new PcreException;
|
if (preg_last_error()) throw new DibiPcreException;
|
||||||
|
|
||||||
foreach ($matches as $m) {
|
foreach ($matches as $m) {
|
||||||
$res[$m[1]] = (int) $m[2];
|
$res[$m[1]] = (int) $m[2];
|
||||||
|
@@ -175,7 +175,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
|||||||
{
|
{
|
||||||
$res = array();
|
$res = array();
|
||||||
preg_match_all('#(.+?): +(\d+) *#', mysqli_info($this->connection), $matches, PREG_SET_ORDER);
|
preg_match_all('#(.+?): +(\d+) *#', mysqli_info($this->connection), $matches, PREG_SET_ORDER);
|
||||||
if (preg_last_error()) throw new PcreException;
|
if (preg_last_error()) throw new DibiPcreException;
|
||||||
|
|
||||||
foreach ($matches as $m) {
|
foreach ($matches as $m) {
|
||||||
$res[$m[1]] = (int) $m[2];
|
$res[$m[1]] = (int) $m[2];
|
||||||
|
@@ -121,7 +121,7 @@ final class DibiTranslator extends DibiObject
|
|||||||
array($this, 'cb'),
|
array($this, 'cb'),
|
||||||
substr($arg, $toSkip)
|
substr($arg, $toSkip)
|
||||||
);
|
);
|
||||||
if (preg_last_error()) throw new PcreException;
|
if (preg_last_error()) throw new DibiPcreException;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -379,7 +379,7 @@ final class DibiTranslator extends DibiObject
|
|||||||
array($this, 'cb'),
|
array($this, 'cb'),
|
||||||
substr($value, $toSkip)
|
substr($value, $toSkip)
|
||||||
);
|
);
|
||||||
if (preg_last_error()) throw new PcreException;
|
if (preg_last_error()) throw new DibiPcreException;
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user