1
0
mirror of synced 2025-02-20 06:03:15 +03:00

made Doctrine_Query ignore empty orderby parameters

This commit is contained in:
zYne 2007-04-13 17:53:16 +00:00
parent 53eabd3d79
commit d1b9daa2b1

View File

@ -550,15 +550,20 @@ class Doctrine_Query extends Doctrine_Hydrate implements Countable {
case 'having':
case 'orderby':
case 'groupby':
$class = "Doctrine_Query_".ucwords($name);
if (empty($args[0])) {
return $this;
}
$class = 'Doctrine_Query_' . ucwords($name);
$parser = new $class($this);
$this->parts[$name] = array($parser->parse($args[0]));
break;
case 'limit':
case 'offset':
if($args[0] == null)
if($args[0] == null) {
$args[0] = false;
}
$this->parts[$name] = $args[0];
break;