Author: jwage
Date: 2008-08-29 21:26:05 +0100 (Fri, 29 Aug 2008)
New Revision: 4862
Modified:
branches/1.0/lib/Doctrine/Query/Abstract.php
Log:
fixes #1335 - Throw an exception when Doctrine_Query::execute() is called with
no from parts
Modified: branches/1.0/lib/Doctrine/Query/Abstract.php
===================================================================
--- branches/1.0/lib/Doctrine/Query/Abstract.php 2008-08-29 20:25:23 UTC
(rev 4861)
+++ branches/1.0/lib/Doctrine/Query/Abstract.php 2008-08-29 20:26:05 UTC
(rev 4862)
@@ -946,6 +946,10 @@
$this->_hydrator->setHydrationMode($hydrationMode);
}
+ if (empty($this->_dqlParts['from']) &&
empty($this->_sqlParts['from'])) {
+ throw new Doctrine_Query_Exception('You must have at least one
component specified in your from.');
+ }
+
$params = $this->getParams($params);
if ($this->_resultCache && $this->_type == self::SELECT) {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---