When I'm trying to select 'COUNT(*)' I get this error:
*Notice*: Object of class Zend_Db_Expr could not be converted to int in
/*Zend/Db/Table/Select.php* on line *125
*To reproduce:
$accountTable = new Account();
$accountTable->select()->from(array('a' => $accountTable->info('name')),
array('COUNT(*)'));
or
$accountTable->select()->from(array('a' => $accountTable->info('name')),
array(new Zend_Db_Expr('COUNT(*)')));
I get same Notice with both versions of code.
Possible solution:
In Zend_Db_Select change:
switch (true) {
case ($column == self::SQL_WILDCARD):
break;
case ($column instanceof Zend_Db_Expr):
case (!in_array($column, $cols)):
$readOnly = true;
break 2;
}
to:
switch (true) {
case ($column instanceof Zend_Db_Expr):
case (!in_array($column, $cols)):
$readOnly = true;
break 2;
case ($column == self::SQL_WILDCARD):
break;
}
--
Sergei Izvorean
Web Developer
2440 Media Inc
401 Wood St., Suite 902
Pittsburgh, PA 15222
[t] 1-888-WEB-2440
[f] 1-877-FAX-2440
www.2440Media.com