merged branch davidwindell/issue_4338 (PR #4357)
Commits -------0a3dd0f
[Console] Check for existence of proc_open to fix #4338 Discussion ---------- [Console] Check for existence of proc_open to fix #4338 It is quite common to disable proc_open for security purposes. This PR checks for the existence of the proc_open function and fixes Issue #4338 Replacement for PR4356 --------------------------------------------------------------------------- by travisbot at 2012-05-21T10:49:59Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1387784) (merged dd991bea into1407f112
). --------------------------------------------------------------------------- by travisbot at 2012-05-21T11:35:21Z This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1387991) (merged0a3dd0fe
into1407f112
). --------------------------------------------------------------------------- by fabpot at 2012-05-21T12:17:32Z I forgot to ask you to sent a new PR for the 2.0 branch instead of master. Thanks. --------------------------------------------------------------------------- by davidwindell at 2012-05-21T13:03:36Z proc_open is not used in 2.0?
This commit is contained in:
commit
bde26b10e7
@ -921,6 +921,10 @@ class Application
|
|||||||
*/
|
*/
|
||||||
private function getSttyColumns()
|
private function getSttyColumns()
|
||||||
{
|
{
|
||||||
|
if (!function_exists('proc_open')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$descriptorspec = array(1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
|
$descriptorspec = array(1 => array('pipe', 'w'), 2 => array('pipe', 'w'));
|
||||||
$process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
|
$process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, array('suppress_errors' => true));
|
||||||
if (is_resource($process)) {
|
if (is_resource($process)) {
|
||||||
|
Reference in New Issue
Block a user