php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33975 ob_end_clean() does call output handler: unadequately result?
Submitted: 2005-08-03 13:16 UTC Modified: 2005-08-03 15:48 UTC
From: php at koterov dot ru Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.11 OS: any
Private report: No CVE-ID: None
 [2005-08-03 13:16 UTC] php at koterov dot ru
Description:
------------
Seems ob_end_clean() does call output handler, but not ignore it. It is not adequately I suppose.

The same bug is at http://bugs.php.net/bug.php?id=16673, but it is on "No feedback" status and I cannot change it to "Open".

Reproduce code:
---------------
<?
$GLOBALS['called'] = false;
function func($buf) {
  $GLOBALS['called'] = true;
  return $buf;
}
ob_start("func");
ob_end_clean();
var_dump($GLOBALS['called']);
?>



Expected result:
----------------
false

Actual result:
--------------
true

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-03 15:02 UTC] sniper@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2005-08-03 15:40 UTC] php at koterov dot ru
Nothing about this behaviour in documentation, only user comment. Does user comment have the same status as official documentation?

Do you thing this behaviour of ob_end_clean() is logical and appropriate?
 [2005-08-03 15:48 UTC] tony2001@php.net
We can't change something that existed for ages just because it looks wrong for you and isn't documented, as this change may break BC.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 14:05:46 2022 UTC