Thanks to visit codestin.com
Credit goes to github.com

Skip to content

#7106 - check php version for getcwd() #7248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

materazu
Copy link

@materazu materazu commented Mar 3, 2013

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #7106
License MIT

@@ -131,8 +131,12 @@ public function __construct($commandline, $cwd = null, array $env = null, $stdin

$this->commandline = $commandline;
$this->cwd = $cwd;

$isOnRangeFor53 = version_compare(PHP_VERSION, '5.3.0', '>=') && version_compare(PHP_VERSION, '5.3.21', '<=');
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no reason for first check.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you link the PHP defect related to those checks in a comment ? thanks

@materazu
Copy link
Author

This seems indeed useless.
Related #7106, can you confirm @Seldaek ?

@fabpot
Copy link
Member

fabpot commented Mar 20, 2013

I'm pretty sure we need to keep the null condition. If not, there is no way to override the cwd.

@Seldaek
Copy link
Member

Seldaek commented Mar 20, 2013

Sure the null check needs to say, it should be like this IMO: if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || defined('PHP_WINDOWS_VERSION_BUILD'))) { ... }

@materazu
Copy link
Author

Ok i'll fix

fabpot added a commit that referenced this pull request Mar 23, 2013
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #7248).

Discussion
----------

#7106 - check php version for getcwd()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7106
| License       | MIT

Commits
-------

11d3855  #7106 - fix for ZTS builds
@fabpot fabpot closed this Mar 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants