php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5437 Multi-line object dereference causes newline to be output
Submitted: 2000-07-07 16:19 UTC Modified: 2000-07-07 18:47 UTC
From: dragonzap1 at aol dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.1pl2 OS: Linux, 2.2.16 kernel
Private report: No CVE-ID: None
 [2000-07-07 16:19 UTC] dragonzap1 at aol dot com
Config options:

./configure \
        --with-mysql=/usr/local/mysql \
        --with-apache=/usr/local/src/apache \
        --with-gd=/usr/local/src/gd \
        --with-jpeg-dir=/usr/local/src/jpeg \
        --with-xml \
        --with-mhash=/usr/local/src/mhash \
        --enable-versioning

Sample script:

<?php

class Bug {
    function test() {
        $x = 5;
    }
}

$nl = new Bug();

$nl->
    test();

Header('Content-type: text/plain');

echo 'Hello.';
?>

Header() complains that output started on line 11, which is the "$nl->" line. On references to variables (instead of method calls) this would sometimes cause the parser to output an error.

Note, however, that:

$nl->[space]
    test();

and:

$nl
->test();

...do not have this problem.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-07 16:40 UTC] stas at cvs dot php dot net
Same problem as in #5387, only different place.
Same problem as in #5387 - Zend engine doesn't like \n's in wrong places.
 [2000-07-07 18:47 UTC] stas at cvs dot php dot net
Fixed in CVS.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 20:00:02 2026 UTC