The error I'm trying to get rid of is there is an additional letter "t" outputted before the rest of the HTML in one of my Zend Framework applications. The "t" is there only in a single action so I'm certain the problem is somewhere there.
For illustration HTML markup of the buggy controller action starts like this:
t<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
It's driving me crazy because I cannot find where this letter is being printed. Here is the entire action:
public function transactionsHistoryAction()
{
$request = $this->getRequest();
$transactions = $this->_getTable('Transactions');
$finishedTransactions = $transactions->getSelect();
$pendingWithdrawals = $transactions->getPendingWithDrawalsSelect();
$paginator = Zend_Paginator::factory($finishedTransactions);
$paginator->setCurrentPageNumber($request->getParam('p'));
$paginator->setItemCountPerPage(20);
$paginator2 = Zend_Paginator::factory($pendingWithdrawals);
$paginator2->setCurrentPageNumber($request->getParam('p2'));
$paginator2->setItemCountPerPage(20);
$this->view->headTitle('Transactions - Administration panel - Website Name');
$this->view->finishedTransactions = $paginator;
$this->view->pendingWithdrawals = $paginator2;
}
And here is the only model I use in that action:
<?php
/**
* transactions table
*
* @author Richard Knop
*/
class Transactions extends Zend_Db_Table_Abstract
{
protected $_name = 'transactions';
protected $_referenceMap = array(
'User' => array(
'columns' => array('user_id'),
'refTableClass' => 'Users',
'refColumns' => array('id')
)
);
private function _getDb()
{
return Zend_Registry::get('dbAdapter');
}
public function getSelect()
{
$select = $this->select();
$where = 'finished = 1';
$select->where($where);
$select->order('id DESC');
return $select;
}
public function getPendingWithdrawalsSelect()
{
$select = $this->select();
$where = "type = 'withdrawal' AND finished = 0";
$select->where($where);
$select->order('id DESC');
return $select;
}
}
Please help me :o
EDIT:
The layout is correct (the "t" is there only in this specific action, all other actions of the same controller output correct HTML without the "t").