|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51766 SplFileInfo::isLink() Fails for Symlinks on windows
Submitted: 2010-05-07 19:08 UTC Modified: 2010-09-01 12:12 UTC
From: v-sumada at microsoft dot com Assigned: pajoye (profile)
Status: Closed Package: SPL related
PHP Version: 5.3.2 OS: All Windows OS
Private report: No CVE-ID: None
 [2010-05-07 19:08 UTC] v-sumada at microsoft dot com
SplFileInfo::isLink()  Which returns False for Symbolic links on all  windows OS. we have a  File Symbolic link created  for a file and tried to test whether the referenced file  by SplFileInfo is symbolic link or not.

In the above script we have a symlink(filesymlink)created for a file 'testfile'  and tried to check with the file_exists function for symlink(filesymlink) which returns true and it returns false for the SplFileInfo::isLink().

Test script:
$symlinkname = "/path/to/filesymlink";
$fileinfo = new SplFileInfo($symlinkname);

Expected result:

Actual result:


add_lstat_support (last revision 2010-08-31 08:53 UTC by
lstat-support-1 (last revision 2010-08-30 17:48 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-07 01:56 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2010-08-07 01:56 UTC]
Pierre, I think you played with symlinks on Windows before, can you add the magic needed, here?
 [2010-08-30 19:46 UTC]
This patch fixes this issue (along other).
 [2010-08-30 19:48 UTC]
The following patch has been added/updated:

Patch Name: lstat-support-1
Revision:   1283190512
 [2010-08-31 10:53 UTC]
The following patch has been added/updated:

Patch Name: add_lstat_support
Revision:   1283244780
 [2010-09-01 12:12 UTC]
-Status: Assigned +Status: Closed
 [2010-09-01 12:12 UTC]
Patch applied to PHP_5_3 and trunk, fixing is_link and SPL's related methods.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 12:03:33 2021 UTC