Re: Infinite Loop / Segfault in ob_*()

From: Date: Sun, 24 Mar 2002 11:02:41 +0000
Subject: Re: Infinite Loop / Segfault in ob_*()
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-81707@lists.php.net to get a copy of this message
Yasuo Ohgaki wrote:
If you really need to call ob_end_clean() (i.e. delete buffer) inside ob_start() call back, we can do that as follows, Set flag before calling callback function. If flag is set and one of buffer deletion function is called inside callback function, then set flag for deleting the buffer. Check deletion flag and if it's set, delete the buffer. It's easy to fix and has a little additional overhead. Any comments?
Come up with better idea. Since you are inside callback function. You can just return "" null string to buffer to erase it. This way works with current code also. Any objections disallowing calling ob_*() function from callback functions? -- Yasuo Ohgaki

« previous php.dev (#81707) next »