#1512: REGRESSION array_merge_recursive()
------------------------------+---------------------------------------------
Reporter: colnector | Owner: romanb
Type: defect | Status: new
Priority: major | Milestone: 1.0.3
Component: Query/Hydration | Version: 1.0.2
Resolution: | Keywords:
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 0 |
------------------------------+---------------------------------------------
Comment (by colnector):
Using the following code you'll be able to get warnings/notices as
exceptions:
{{{
function errorHandler($errno, $errstr, $errfile, $errline) {
throw new Exception($errstr, $errno);
}
set_error_handler('errorHandler');
}}}
The exception (converted from the warning) is raised in my code in a line
that contains this:
{{{
$q = $q->addWhere('i.producer_id IN (SELECT p3.id FROM Producer p3 WHERE
p3.category_id = 10 AND p3.country_id = 8)';
}}}
That bit of the stack trace may also help:
{{{
at array_merge_recursive(array(array('10', '10'), array('Active'),
array(), array()), array(array(), array(), array(), array()))
in
SF_ROOT_DIR\plugins\sfDoctrinePlugin\lib\doctrine\Doctrine\Query\Abstract.php
line 562 ...
559. */
560. public function mergeSubqueryBack(Doctrine_Query_Abstract
$subquery)
561. {
562. $this->_params = array_merge_recursive($this->_params,
$subquery->_params);
563. $this->_tableAliasMap =
array_merge($this->_tableAliasMap, $subquery->_tableAliasMap);
564. }
at Doctrine_Query_Abstract->mergeSubqueryBack(object('Doctrine_Query'))
in
SF_ROOT_DIR\plugins\sfDoctrinePlugin\lib\doctrine\Doctrine\Query\Where.php
line 106 ...
103. // subquery found
104. $q =
$this->query->createSubquery()->parseQuery($trimmed, false);
105. $sql = $q->getSql();
106. $this->query->mergeSubqueryBack($q);
107. $value = '(' . $sql . ')';
108.
109. // If custom sql for custom subquery
}}}
Let me know if I can further assist.
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1512#comment:6>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---