Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Empty string is a nonvalid literal value for the PostgreSQL boolean t…
Browse files Browse the repository at this point in the history
…ype. Fixed
  • Loading branch information
AgentCoop committed May 16, 2013
1 parent a86a968 commit 0db5aa2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions library/Zend/Db/Adapter/Driver/Pdo/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ protected function bindParametersFromContainer()

$parameters = $this->parameterContainer->getNamedArray();
foreach ($parameters as $name => &$value) {
$type = \PDO::PARAM_STR;
if (is_bool($value)) {
$type = \PDO::PARAM_BOOL;
} else {
$type = \PDO::PARAM_STR;
}
if ($this->parameterContainer->offsetHasErrata($name)) {
switch ($this->parameterContainer->offsetGetErrata($name)) {
case ParameterContainer::TYPE_INTEGER:
Expand All @@ -276,9 +280,6 @@ protected function bindParametersFromContainer()
case ParameterContainer::TYPE_LOB:
$type = \PDO::PARAM_LOB;
break;
case (is_bool($value)):
$type = \PDO::PARAM_BOOL;
break;
}
}

Expand Down

0 comments on commit 0db5aa2

Please sign in to comment.