php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22217 trim() and ltrim() don't like M
Submitted: 2003-02-13 17:14 UTC Modified: 2003-02-13 17:19 UTC
From: james at sumners dot ath dot cx Assigned:
Status: Not a bug Package: Strings related
PHP Version: 4.2.3 OS: Debian GNU/Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: james at sumners dot ath dot cx
New email:
PHP Version: OS:

 

 [2003-02-13 17:14 UTC] james at sumners dot ath dot cx
I found what seems to be a bug with the trim functions, at least with trim() and ltrim(). I am working with some data like "NAME=First Last" where I have to trim off "NAME=". Every time a name occurs where the first name starts with an 'M' then the 'M' would be trimmed off. Any other character seems to be fine.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-13 17:19 UTC] moriyoshi@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

NAME=MAN....
^^^^^^^^
All those characters are trimmed by trim($str, \"NAME=\")

because \"MAN\" are also part of a character sequence to be trimmed.





 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 01:01:28 2024 UTC