Bug #68990 [NEW]: php notices doesn't not buffered in command line

From: Date: Thu, 05 Feb 2015 12:32:38 +0000
Subject: Bug #68990 [NEW]: php notices doesn't not buffered in command line
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190477@lists.php.net to get a copy of this message
From:             kartechgc at gmail dot com
Operating system: ubuntu
PHP version:      Irrelevant
Package:          Output Control
Bug Type:         Bug
Bug description:php notices doesn't not buffered in command line

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

-- 
Edit bug report at https://bugs.php.net/bug.php?id=68990&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=68990&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=68990&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=68990&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=68990&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=68990&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=68990&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=68990&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=68990&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=68990&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=68990&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=68990&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=68990&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=68990&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68990&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=68990&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=68990&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=68990&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68990&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=68990&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=68990&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#190477) next »