[Console] Check if dialog helper actually exists

This commit is contained in:
lenar 2011-09-29 11:45:17 +03:00
parent 0f7bf4155c
commit fd00ed0be1

View File

@ -170,9 +170,9 @@ class Application
$input->setInteractive(false);
}
if (function_exists('posix_isatty')) {
if (function_exists('posix_isatty') && $this->getHelperSet()->has('dialog')) {
$inputStream = $this->getHelperSet()->get('dialog')->getInputStream();
if (!@posix_isatty($inputStream)) {
if (!posix_isatty($inputStream)) {
$input->setInteractive(false);
}
}