ZF-1206: Zend_Filter_RealPath to support non-existing paths

Issue Type: Improvement Created: 2007-04-05T08:11:53.000+0000 Last Updated: 2009-04-25T13:19:47.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Andries Seutens (andries) Assignee: Thomas Weidner (thomas) Tags: - Zend_Filter

Related issues: Attachments:


I would like to suggest to add an enhancement to the current Zend_Filter_RealPath filter. PHP's function realpath will give you the absolute path from the provided path, however this does not work when a path does not exist. Realpath would then return false.

Allowing calculation of realpath() results when the input path does not exist, would be a good enhancement for the current implementation.

However, the developer should be able to turn this feature on/off, as I can imagine the need of having false returned when the path does not exist.


Posted by Andries Seutens (andries) on 2007-04-07T18:12:45.000+0000

Assigned to Andries Seutens.

Posted by Darby Felton (darby) on 2007-04-10T17:25:49.000+0000

Update to summary and affects version 0.9.2.

Posted by Andries Seutens (andries) on 2007-04-11T15:40:45.000+0000

There is working code available at

Posted by Andries Seutens (andries) on 2007-04-11T15:44:48.000+0000

And unit tests:

Posted by Andries Seutens (andries) on 2007-04-13T11:13:16.000+0000

We have not agreed yet how to turn the feature on/off. I personally would prefer havinig a public property which could be set to true (default) or false.

Another idea is to have a public method allowVirtualPath(true)...

Posted by Andries Seutens (andries) on 2007-06-27T07:38:11.000+0000

Updated priority from critical to minor.

Posted by Thomas Weidner (thomas) on 2009-04-25T09:32:27.000+0000

Andries: Please give code or a description on how this should be done. Actually I see problems if the complete path does not exist.

When there is no response I will close this issue as won't fix as there are wether votes nor watchers on it.

Posted by Nils Caspar (pencil) on 2009-04-25T09:45:53.000+0000

I re-uploaded Andries' code:

Posted by Thomas Weidner (thomas) on 2009-04-25T13:19:45.000+0000

New feature added with r15153

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.