forked from lisantra-technologies/VersionControl_Hg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes lisantra-technologies#3 for ubuntu 12.10 with PHP 5.4
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
387c787
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remember correctly, I commented out DIRECTORY_SEPARATOR because on Windows, Path might have already terminated in a slash. I'll re-run the tests with DIRECTORY_SEPARATOR back in on Windows and confirm or deny. I'll definitely merge the the first chunk: that's a real egregious oversight on my part. If all is well with the second chunk, I'll merge the who pull request as is.
387c787
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the casing is different on different OS's:
Uppercasing it to "PATH" on Windows emits a PHP warning, that the index does not exist, and returns an empty value. Bummer. Now, I'm looking for an OS-independent way of grabbing the path, or even not using $_SERVER, but so far, no joy. I can just add a constant for it at the head of the file and test for OS as we do for the binary (and abstract that test out to a private function or statement in the constructor to set a class property as a flag). Suggestions?
387c787
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This happens because $_SERVER['PATH'] is actually an operating system environment variable, not a PHP thing. I'm making a pull request which grabs this a few lines above when we're doing windows/*nix stuff separately anyway. We may need to revisit but I think it's good enough to be going on with!