Error: An Internal Error Has Occurred.
try {
$query = $this->_connection->prepare($sql, $prepareOptions);
$query->setFetchMode(PDO::FETCH_LAZY);
if (!$query->execute($params)) {
$this->_results = $query;
array()
$options += array('log' => $this->fullDebug);
$t = microtime(true);
$this->_result = $this->_execute($sql, $params);
'SELECT `News`.`id`, `News`.`year`, `News`.`month`, `News`.`day`, `News`.`category`, `News`.`title`, `News`.`text`, `News`.`choice`, `News`.`file`, `News`.`file_text`, `News`.`url`, `News`.`open`, `News`.`modified`, `News`.`created` FROM `asq-fs_cms`.`news` AS `News` WHERE `News`.`open` <> 2 AND ( (( * 10000) + ( * 100) + ) <= ((`News`.`year` * 10000) + (`News`.`month` * 100) + `News`.`day`) OR ((( * 10000) + ( * 100) + ) = ((`News`.`year` * 10000) + (`News`.`month` * 100) + `News`.`day`) AND `News`.`created` > '')) AND `News`.`id` <> 69 ORDER BY `News`.`Year` ASC, `News`.`month` ASC, `News`.`day` ASC, `News`.`id` ASC LIMIT 1' array()
if ($cache && ($cached = $this->getQueryCache($sql, $params)) !== false) {
return $cached;
}
$result = $this->execute($sql, array(), $params);
if ($result) {
'SELECT `News`.`id`, `News`.`year`, `News`.`month`, `News`.`day`, `News`.`category`, `News`.`title`, `News`.`text`, `News`.`choice`, `News`.`file`, `News`.`file_text`, `News`.`url`, `News`.`open`, `News`.`modified`, `News`.`created` FROM `asq-fs_cms`.`news` AS `News` WHERE `News`.`open` <> 2 AND ( (( * 10000) + ( * 100) + ) <= ((`News`.`year` * 10000) + (`News`.`month` * 100) + `News`.`day`) OR ((( * 10000) + ( * 100) + ) = ((`News`.`year` * 10000) + (`News`.`month` * 100) + `News`.`day`) AND `News`.`created` > '')) AND `News`.`id` <> 69 ORDER BY `News`.`Year` ASC, `News`.`month` ASC, `News`.`day` ASC, `News`.`id` ASC LIMIT 1' array() array()
// Build SQL statement with the primary model, plus hasOne and belongsTo associations
$query = $this->buildAssociationQuery($Model, $queryData);
$resultSet = $this->fetchAll($query, $Model->cacheQueries);
unset($query);
'SELECT `News`.`id`, `News`.`year`, `News`.`month`, `News`.`day`, `News`.`category`, `News`.`title`, `News`.`text`, `News`.`choice`, `News`.`file`, `News`.`file_text`, `News`.`url`, `News`.`open`, `News`.`modified`, `News`.`created` FROM `asq-fs_cms`.`news` AS `News` WHERE `News`.`open` <> 2 AND ( (( * 10000) + ( * 100) + ) <= ((`News`.`year` * 10000) + (`News`.`month` * 100) + `News`.`day`) OR ((( * 10000) + ( * 100) + ) = ((`News`.`year` * 10000) + (`News`.`month` * 100) + `News`.`day`) AND `News`.`created` > '')) AND `News`.`id` <> 69 ORDER BY `News`.`Year` ASC, `News`.`month` ASC, `News`.`day` ASC, `News`.`id` ASC LIMIT 1' false
* @return array
*/
protected function _readDataSource($type, $query) {
$results = $this->getDataSource()->read($this, $query);
$this->resetAssociations();
object(News) { name => 'News' recursive => (int) 2 items => array( [maximum depth reached] ) conditionStringAry => array([maximum depth reached]) useDbConfig => 'default' useTable => 'news' id => false data => array([maximum depth reached]) schemaName => 'asq-fs_cms' table => 'news' primaryKey => 'id' validate => array([maximum depth reached]) validationErrors => array([maximum depth reached]) validationDomain => null plugin => null alias => 'News' tableToModel => array( [maximum depth reached] ) cacheQueries => false belongsTo => array([maximum depth reached]) hasOne => array([maximum depth reached]) hasMany => array([maximum depth reached]) hasAndBelongsToMany => array([maximum depth reached]) actsAs => null Behaviors => object(BehaviorCollection) {} whitelist => array([maximum depth reached]) cacheSources => true findQueryType => 'first' order => null virtualFields => array([maximum depth reached]) __backAssociation => array([maximum depth reached]) __backInnerAssociation => array([maximum depth reached]) __backOriginalAssociation => array([maximum depth reached]) __backContainableAssociation => array([maximum depth reached]) findMethods => array( [maximum depth reached] ) tablePrefix => '' } array( 'conditions' => 'News.open <> 2 AND ( (( * 10000) + ( * 100) + ) <= ((News.year * 10000) + (News.month * 100) + News.day) OR ((( * 10000) + ( * 100) + ) = ((News.year * 10000) + (News.month * 100) + News.day) AND News.created > '')) AND News.id <> 69', 'fields' => null, 'joins' => array(), 'limit' => (int) 1, 'offset' => null, 'order' => array( (int) 0 => 'News.Year ASC, News.month ASC, News.day ASC, News.id ASC' ), 'page' => (int) 1, 'group' => null, 'callbacks' => true, 'field' => 'News.id' )
return null;
}
return $this->_readDataSource($type, $query);
}
'first' array( 'conditions' => 'News.open <> 2 AND ( (( * 10000) + ( * 100) + ) <= ((News.year * 10000) + (News.month * 100) + News.day) OR ((( * 10000) + ( * 100) + ) = ((News.year * 10000) + (News.month * 100) + News.day) AND News.created > '')) AND News.id <> 69', 'fields' => null, 'joins' => array(), 'limit' => (int) 1, 'offset' => null, 'order' => array( (int) 0 => 'News.Year ASC, News.month ASC, News.day ASC, News.id ASC' ), 'page' => (int) 1, 'group' => null, 'callbacks' => true, 'field' => 'News.id' )
(({$data['News']['year']} * 10000) + ({$data['News']['month']} * 100) + {$data['News']['day']}) <= ((News.year * 10000) + (News.month * 100) + News.day) OR
((({$data['News']['year']} * 10000) + ({$data['News']['month']} * 100) + {$data['News']['day']}) = ((News.year * 10000) + (News.month * 100) + News.day) AND News.created > '{$data['News']['created']}'))
AND News.id <> {$id}";
$neighbors["prev"] = $this->News->find('first', array("conditions" => $conditions, "field" => "News.id", "order" => "News.Year ASC, News.month ASC, News.day ASC, News.id ASC"));
'first' array( 'conditions' => 'News.open <> 2 AND ( (( * 10000) + ( * 100) + ) <= ((News.year * 10000) + (News.month * 100) + News.day) OR ((( * 10000) + ( * 100) + ) = ((News.year * 10000) + (News.month * 100) + News.day) AND News.created > '')) AND News.id <> 69', 'field' => 'News.id', 'order' => 'News.Year ASC, News.month ASC, News.day ASC, News.id ASC' )
'69'
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
object(NewsController) { name => 'News' components => array( [maximum depth reached] ) helpers => array( [maximum depth reached] ) items => array( [maximum depth reached] ) layout => 'default' paginate => (int) 20 listOrder => 'ASC' htmlTitle => 'NEWS' paginateKind => (int) 1 html => null uses => array( [maximum depth reached] ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'News' layoutPath => null viewVars => array( [maximum depth reached] ) view => 'detail' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array( [maximum depth reached] ) scaffold => false methods => array( [maximum depth reached] ) modelClass => 'News' modelKey => 'news' validationErrors => null Session => object(SessionComponent) {} Item => object(ItemComponent) {} Db => object(DbComponent) {} RequestHandler => object(RequestHandlerComponent) {} Html => object(HtmlHelper) {} News => object(News) {} } array( (int) 0 => '69' )
$response = $controller->response;
$render = true;
$result = $controller->invokeAction($request);
if ($result instanceof CakeResponse) {
object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array( [maximum depth reached] ) url => 'news/detail/69' base => '' webroot => '/' here => '/news/detail/69' }
));
}
$response = $this->_invoke($controller, $request);
if (isset($request->params['return'])) {
object(NewsController) { name => 'News' components => array( [maximum depth reached] ) helpers => array( [maximum depth reached] ) items => array( [maximum depth reached] ) layout => 'default' paginate => (int) 20 listOrder => 'ASC' htmlTitle => 'NEWS' paginateKind => (int) 1 html => null uses => array( [maximum depth reached] ) request => object(CakeRequest) {} response => object(CakeResponse) {} viewPath => 'News' layoutPath => null viewVars => array( [maximum depth reached] ) view => 'detail' autoRender => true autoLayout => true Components => object(ComponentCollection) {} viewClass => 'View' View => null ext => '.ctp' plugin => null cacheAction => false passedArgs => array( [maximum depth reached] ) scaffold => false methods => array( [maximum depth reached] ) modelClass => 'News' modelKey => 'news' validationErrors => null Session => object(SessionComponent) {} Item => object(ItemComponent) {} Db => object(DbComponent) {} RequestHandler => object(RequestHandlerComponent) {} Html => object(HtmlHelper) {} News => object(News) {} } object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array( [maximum depth reached] ) url => 'news/detail/69' base => '' webroot => '/' here => '/news/detail/69' }
App::uses('Dispatcher', 'Routing');
$Dispatcher = new Dispatcher();
$Dispatcher->dispatch(new CakeRequest(), new CakeResponse());
object(CakeRequest) { params => array( [maximum depth reached] ) data => array([maximum depth reached]) query => array( [maximum depth reached] ) url => 'news/detail/69' base => '' webroot => '/' here => '/news/detail/69' } object(CakeResponse) { }