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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Sat Dec 14 06:01:27 2024 UTC