php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #60040 "!var & flags" used
Submitted: 2011-10-11 14:14 UTC Modified: 2014-11-19 09:07 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: jille at hexon dot cx Assigned: kalle (profile)
Status: Wont fix Package: Output Control
PHP Version: 5.3.8 OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
45 - 40 = ?
Subscribe to this entry?

 
 [2011-10-11 14:14 UTC] jille at hexon dot cx
Description:
------------
The patch is self-explanatory, but:

php_end_ob_buffer contains:
  if (!OG(active_ob_buffer).status & PHP_OUTPUT_HANDLER_START) {
    /* our first call */
    status |= PHP_OUTPUT_HANDLER_START;
  }

But !var & flags will first evaluate !var and only after that evaluate the AND-operator.

In this case it doesn't have any affect as PHP_OUTPUT_HANDLER_START is 1.


Patches

php_end_ob_buffer.diff (last revision 2011-10-11 14:15 UTC by jille at hexon dot cx)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-18 01:52 UTC] kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: kalle
 [2014-11-19 09:07 UTC] mike@php.net
-Status: Assigned +Status: Wont fix
 [2014-11-19 09:07 UTC] mike@php.net
5.3 is dead.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC