[wp-trac] Re: [WordPress Trac] #3354: PHP 5.2 & Fatal error in
cache.php
WordPress Trac
wp-trac at lists.automattic.com
Fri Jan 12 22:58:16 GMT 2007
#3354: PHP 5.2 & Fatal error in cache.php
-----------------------+----------------------------------------------------
Reporter: pulponair | Owner: ryan
Type: defect | Status: new
Priority: normal | Milestone: 2.1
Component: General | Version: 2.0.5
Severity: blocker | Resolution:
Keywords: |
-----------------------+----------------------------------------------------
Comment (by Denis-de-Bernardy):
The suggested fix worked on my laptop, yes. But inserting this in
function.php did so as well:
{{{
# fix php 5.2
if ( !function_exists('ob_end_flush_all') ) :
function ob_end_flush_all()
{
while ( @ob_end_flush() );
}
register_shutdown_function('ob_end_flush_all');
endif;
}}}
I was only getting the bug when I was using output buffers. Forcing the
output buffer to flush before the shutdown occurs (and thus before
variables are destroyed) fixed this issue and many others I was getting.
Please be so kind to keep the conditional wrapper if you decide to use the
above code. I'd hate to end up with function name collisions with my own
scripts.
Denis
--
Ticket URL: <http://trac.wordpress.org/ticket/3354#comment:28>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list