Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Fixed module loader to work with *.tar modules in IIS7.5 on Win 2008 R2 #5729

Closed
wants to merge 9 commits into from
Closed

Conversation

jameslnewell
Copy link
Contributor

realpath('.') and realpath('') were returning false on a particular machine with IIS7.5 on Win 2008 R2.

@@ -186,7 +186,7 @@ public function autoload($class)
$path = $path . $moduleClassPath;

if ($path == '.' || substr($path, 0, 2) == './' || substr($path, 0, 2) == '.\\') {
$path = realpath('.') . substr($path, 1);
$path = getcwd() . substr($path, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on some unix systems, this fails

Needs a fallback

@@ -186,7 +186,10 @@ public function autoload($class)
$path = $path . $moduleClassPath;

if ($path == '.' || substr($path, 0, 2) == './' || substr($path, 0, 2) == '.\\') {
$path = realpath('.') . substr($path, 1);
if (($basePath = realpath('.')) === false) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the assignment out of the conditional, please.

@weierophinney weierophinney added this to the 2.2.6 milestone Mar 3, 2014
@Ocramius Ocramius self-assigned this Mar 4, 2014
Ocramius added a commit to Ocramius/zf2 that referenced this pull request Mar 4, 2014
@Ocramius Ocramius closed this in 0e6346c Mar 4, 2014
@Ocramius
Copy link
Member

Ocramius commented Mar 4, 2014

@jameslnewell FYI, I squshed the commits before merging

gianarb pushed a commit to zendframework/zend-loader that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-loader that referenced this pull request May 15, 2015
gianarb pushed a commit to zendframework/zend-loader that referenced this pull request May 15, 2015
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants