Update PicoDb
This commit is contained in:
5
vendor/PicoDb/Database.php
vendored
5
vendor/PicoDb/Database.php
vendored
@@ -86,6 +86,11 @@ class Database
|
|||||||
|
|
||||||
public function escapeIdentifier($value)
|
public function escapeIdentifier($value)
|
||||||
{
|
{
|
||||||
|
// Do not escape custom query
|
||||||
|
if (strpos($value, '.') !== false || strpos($value, ' ') !== false) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
return $this->pdo->escapeIdentifier($value);
|
return $this->pdo->escapeIdentifier($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1
vendor/PicoDb/Drivers/Mysql.php
vendored
1
vendor/PicoDb/Drivers/Mysql.php
vendored
@@ -70,7 +70,6 @@ class Mysql extends \PDO {
|
|||||||
|
|
||||||
public function escapeIdentifier($value)
|
public function escapeIdentifier($value)
|
||||||
{
|
{
|
||||||
if (strpos($value, '.') !== false) return $value;
|
|
||||||
return '`'.$value.'`';
|
return '`'.$value.'`';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
1
vendor/PicoDb/Drivers/Sqlite.php
vendored
1
vendor/PicoDb/Drivers/Sqlite.php
vendored
@@ -51,7 +51,6 @@ class Sqlite extends \PDO {
|
|||||||
|
|
||||||
public function escapeIdentifier($value)
|
public function escapeIdentifier($value)
|
||||||
{
|
{
|
||||||
if (strpos($value, '.') !== false) return $value;
|
|
||||||
return '"'.$value.'"';
|
return '"'.$value.'"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user