mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
- binary unescape doesn't throw exceptions more
This commit is contained in:
@@ -242,6 +242,9 @@ class DibiMsSqlDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -242,6 +242,9 @@ class DibiMsSql2005Driver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -320,6 +320,9 @@ class DibiMySqlDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -303,6 +303,9 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -248,6 +248,9 @@ class DibiOdbcDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -249,6 +249,9 @@ class DibiOracleDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -291,6 +291,9 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -289,13 +289,10 @@ class DibiPostgreDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
switch ($type) {
|
if ($type === dibi::BINARY) {
|
||||||
case dibi::BINARY:
|
|
||||||
return pg_unescape_bytea($value);
|
return pg_unescape_bytea($value);
|
||||||
|
|
||||||
default:
|
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
|
||||||
}
|
}
|
||||||
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -262,6 +262,9 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver
|
|||||||
*/
|
*/
|
||||||
public function unescape($value, $type)
|
public function unescape($value, $type)
|
||||||
{
|
{
|
||||||
|
if ($type === dibi::BINARY) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
throw new InvalidArgumentException('Unsupported type.');
|
throw new InvalidArgumentException('Unsupported type.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user