Skip to content

Commit

Permalink
fix: quoting in database queries
Browse files Browse the repository at this point in the history
  • Loading branch information
kulbakin committed Nov 23, 2014
1 parent 38baa9d commit b4676f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libraries/anahita/domain/store/database.php
Expand Up @@ -307,9 +307,9 @@ public function getColumns($table)
public function quoteValue($value)
{
if ($value === NULL) return 'NULL';
if (is_numeric($value)) return $value;
if (is_int($value) or is_float($value)) return $value;
if ($value === false) return 0;
if (empty($value)) return '\'\'';
if ('' === $value or array() === $value) return "''";

if (is_array($value)) {
$values = array_unique($value);
Expand Down

0 comments on commit b4676f7

Please sign in to comment.