php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68990 php notices doesn't not buffered in command line
Submitted: 2015-02-05 12:32 UTC Modified: 2015-02-06 05:27 UTC
From: kartechgc at gmail dot com Assigned:
Status: Closed Package: Output Control
PHP Version: Irrelevant OS: ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kartechgc at gmail dot com
New email:
PHP Version: OS:

 

 [2015-02-05 12:32 UTC] kartechgc at gmail dot com
Description:
------------
<?php
ob_start();
echo "Hello world";
echo $a; 
ob_end_clean();
?>

Output:
PHP Notice:  Undefined variable: a in /home/karthik/scripts/a1.php on line 4
PHP Stack trace:
PHP   1. {main}() /home/karthik/scripts/a1.php:0

Here, even notice shouldn't have been there in the output. Does notices bypass this buffer?
If the same script is run through browser, the output is empty as expected.

Test script:
---------------
<?php
ob_start();
echo "Hello world";
echo $a; 
ob_end_clean();
?>


Expected result:
----------------
The output should be empty.

Actual result:
--------------
PHP Notice:  Undefined variable: a in /home/karthik/scripts/a1.php on line 4
PHP Stack trace:
PHP   1. {main}() /home/karthik/scripts/a1.php:0

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-06 05:27 UTC] kartechgc at gmail dot com
-Status: Open +Status: Closed
 [2015-02-06 05:27 UTC] kartechgc at gmail dot com
Invalid
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Nov 27 03:03:12 2021 UTC