dblayeroo : normalize : use the trim only if not null value is provided
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4792 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -2630,7 +2630,11 @@ class dblayeroo
|
||||
{
|
||||
if (! is_array ($values))
|
||||
$this->DBException ("Invalid values to normalize : not an array", 406);
|
||||
$values = array_map ("trim", $values);
|
||||
foreach ($values as $key => $val)
|
||||
{
|
||||
if ($val !== null)
|
||||
$values[$key] = trim ($val);
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
// }}}
|
||||
@@ -3192,7 +3196,7 @@ class dblayeroo
|
||||
{
|
||||
if (! key_exists ($this->dsn, self::$instance))
|
||||
$this->DBException ("Direct query without established connection");
|
||||
return self::$instance[$this->dsn]->query ($sql, PDO::FETCH_ASSOC);
|
||||
return self::$instance[$this->dsn]->query ($sql, \PDO::FETCH_ASSOC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user