php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46687 pathinfo() returns unicode strings on Linux and non unicode strings on Windows
Submitted: 2008-11-26 17:52 UTC Modified: 2008-12-28 20:17 UTC
From: ant@php.net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 6CVS-2008-11-26 (snap) OS: Windows, Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ant@php.net
New email:
PHP Version: OS:

 

 [2008-11-26 17:52 UTC] ant@php.net
Description:
------------
The following test was ported from 5.3 and behaves differently:
ext/standard/tests/file/pathinfo_variation2.phpt




Reproduce code:
---------------
On Windows the test produces:

*** Testing pathinfo() : usage variation ***

--float 10.5--
unicode(6) "inet.h"

--float -10.5--
unicode(6) "inet.h"

--float 12.3456789000e10--
unicode(17) "/usr/include/arpa"

--float -12.3456789000e10--
string(0) ""

While on Linux it produces:

*** Testing pathinfo() : usage variation ***

--float 10.5--
unicode(6) "inet.h"

--float -10.5--
unicode(6) "inet.h"

--float 12.3456789000e10--
unicode(%d) %s

--float -12.3456789000e10--
unicode(%d) %s

--float .5--
string(0) ""

Notice the return type for the float 0.5 case.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-26 18:06 UTC] ant@php.net
Sorry, the example output was incorrect and should have shown a 
unicode string for Linux (copy and paste error creating the bug!).

So when the test is run on Windows the following diff is produced:
013+ string(0) ""
013- unicode(%d) %s
 [2008-12-28 20:17 UTC] felipe@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 10:01:28 2024 UTC