Skip to content

Commit

Permalink
Merge pull request #90 from YetiCGN/patch-1
Browse files Browse the repository at this point in the history
Prevent message "Call to undefined function InvalidArgumentException()"
  • Loading branch information
beberlei committed Jan 10, 2012
2 parents 98424cc + 2170747 commit 6034634
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
Expand Up @@ -703,7 +703,7 @@ public function getInExpression($column, $values)
$values = $this->getIdentifiers($values); $values = $this->getIdentifiers($values);


if (count($values) == 0) { if (count($values) == 0) {
throw \InvalidArgumentException('Values must not be empty.'); throw new \InvalidArgumentException('Values must not be empty.');
} }
return $column . ' IN (' . implode(', ', $values) . ')'; return $column . ' IN (' . implode(', ', $values) . ')';
} }
Expand Down Expand Up @@ -1700,7 +1700,7 @@ public function getCheckDeclarationSQL(array $definition)
public function getUniqueConstraintDeclarationSQL($name, Index $index) public function getUniqueConstraintDeclarationSQL($name, Index $index)
{ {
if (count($index->getColumns()) == 0) { if (count($index->getColumns()) == 0) {
throw \InvalidArgumentException("Incomplete definition. 'columns' required."); throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
} }


return 'CONSTRAINT ' . $name . ' UNIQUE (' return 'CONSTRAINT ' . $name . ' UNIQUE ('
Expand All @@ -1725,7 +1725,7 @@ public function getIndexDeclarationSQL($name, Index $index)
} }


if (count($index->getColumns()) == 0) { if (count($index->getColumns()) == 0) {
throw \InvalidArgumentException("Incomplete definition. 'columns' required."); throw new \InvalidArgumentException("Incomplete definition. 'columns' required.");
} }


return $type . 'INDEX ' . $name . ' (' return $type . 'INDEX ' . $name . ' ('
Expand Down

0 comments on commit 6034634

Please sign in to comment.