I was surprised to find that every 90 odd seconds, I was seeing weird errors from the unread notifications lookup. Every time was the same, unexplained failure - no concrete reason, every request was simply left as 'pending'.
After some digging, I found there is one consistent reason for this: return_raw forces all the buffers to close. The problem is, doing that seems to cause it to screw up - in my case *every* request was failing because of this.
Bizarrely, if I don't close the output buffers, it works exactly as expected for me, behaves consistently regardless of setting. (All I did was comment out that line)
If the end-buffers line is left alone, it only works if enableCompressedOutput is disabled.
Curiouser and curiouser, I added the following debug code before the end-levels line:
Code: [Select]
With it enabled:Quote With it disabled:Quote
After some digging, I found there is one consistent reason for this: return_raw forces all the buffers to close. The problem is, doing that seems to cause it to screw up - in my case *every* request was failing because of this.
Bizarrely, if I don't close the output buffers, it works exactly as expected for me, behaves consistently regardless of setting. (All I did was comment out that line)
If the end-buffers line is left alone, it only works if enableCompressedOutput is disabled.
Curiouser and curiouser, I added the following debug code before the end-levels line:
global $settings;
trigger_error('Compressed output: ' . (!empty($settings['enableCompressedOutput']) ? 'ON' : 'OFF') . "\n" . print_r(ob_list_handlers(), true));With it enabled:
1024: Compressed output: ON
Array
([1] => ob_gzhandler
- => default output handler
)
1024: Compressed output: OFF
Array
([1] => default output handler
- => default output handler
)


