clarification for use of @ob_end_clean() I'm getting an EXC_BAD_ACCESS error..
Posted: Tue Apr 08, 2008 1:33 am
I'm getting an EXC_BAD_ACCESS exception in my browsers at semi-random times..
this crashes the browser (firefox and safari on mac OSX leopard) and give the EXC_BAD_ACCESS error.
this is when browsing the site..
I can't figure out why and think it could be related to a UDT.
I read on http://www.cocoabuilder.com/archive/mes ... /18/114851
This kind of problem is almost always the result of over-releasing an object.
How does this figure for me.. Should I only call @ob_start() once?
I figure since I am using it twice in a row it could be the cause...
Any ideas greatly appreciated.
this crashes the browser (firefox and safari on mac OSX leopard) and give the EXC_BAD_ACCESS error.
this is when browsing the site..
I can't figure out why and think it could be related to a UDT.
Code: Select all
/* user defined tag to place side_bar content on certain pages */
global $gCms;
$current = $gCms->variables['page_name'];
// add news/whatshot sidebar if needed for these pages
if($current =="flavour"||$current =="grow"||$current =="thrive"||$current =="eat"||$current =="hungry" ){
$smarty_data = "{global_content name='news'}";
$smarty->_compile_source('temporary template', $smarty_data, $_compiled );
@ob_start();
$smarty->_eval('?>' . $_compiled);
$_contents = @ob_get_contents();
@ob_end_clean();
echo $_contents;
// add whats hot content
$smarty_data = "{global_content name='whats_hot'}";
$smarty->_compile_source('temporary template', $smarty_data, $_compiled );
@ob_start();
$smarty->_eval('?>' . $_compiled);
$_contents = @ob_get_contents();
@ob_end_clean();
echo $_contents;
}
This kind of problem is almost always the result of over-releasing an object.
How does this figure for me.. Should I only call @ob_start() once?
I figure since I am using it twice in a row it could be the cause...
Any ideas greatly appreciated.