php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1649 ltrim() behaves much like trim()
Submitted: 1999-07-02 05:47 UTC Modified: 1999-07-02 13:37 UTC
From: pallas at kadan dot cz Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.11 OS: RedHat Linux 6.0, Kernel 2.2.10,
Private report: No CVE-ID: None
 [1999-07-02 05:47 UTC] pallas at kadan dot cz
After switching from PHP 3.0.7 to PHP 3.0.11 I found out that ltrim() behaves much like
trim() e.g. it strips newlines (maybe whitespace as well) from the _end_ of the supplied string 
as well. I put up a test script at http://uf.kadan.cz/~pallas/ltrimtest.php3 and its source at
http://uf.kadan.cz/~pallas/ltrimtest.phps. The script produces the same result in browser, but
if you look at the page source, you can clearly see, that the newlines have been stripped where 
ltrim() was applied. For more information about PHP environment, I've put up a phpinfo() at
http://uf.kadan.cz/~pallas/info.php3. I hope it's enough information provided.

I configured PHP using the following configuration line:

configure \
  --with-zlib \
  --with-gd \
  --with-gdbm \
  --with-pgsql=/opt/postgres \
  --with-shared-apache=../apache_1.3.6 \
  --with-exec-dir=/home/httpd/CGI \
  --enable-track-vars=yes

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-02 13:37 UTC] sas at cvs dot php dot net
Thanks for paying attention. Fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 08:01:32 2024 UTC