From b3228a3ff580abd3ea33b37a349d48617285e29a Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 30 Dec 2009 14:08:13 +0000 Subject: Work around PHP bug 49819: posix_isatty seeks to start --- it.class | 1 + it_debug.class | 1 + 2 files changed, 2 insertions(+) diff --git a/it.class b/it.class index 17f5658..8a6b8d7 100644 --- a/it.class +++ b/it.class @@ -155,6 +155,7 @@ function error($p = array(), $body = null, $to = null) # $body and $to deprecate @chmod("/tmp/alertdata", 0777); $toscreen = ini_get('display_errors') || (defined("STDOUT") && posix_isatty(STDOUT)) || EDC('astwin') || EDC('asdevel'); + @fseek(STDOUT, 0, SEEK_END); # Work around PHP bug 49819: posix_isatty seeks to start if ($toscreen && !it::is_live()) $GLOBALS['debug_noredir'] = 1; diff --git a/it_debug.class b/it_debug.class index d8f45cf..b7213d5 100644 --- a/it_debug.class +++ b/it_debug.class @@ -95,6 +95,7 @@ function dump($args) $nored = "\033[m"; } + @fseek(STDOUT, 0, SEEK_END); # Work around PHP bug 49819: posix_isatty seeks to start $src = it_debug::srcline(1); list($function, $paramlist) = it::match('\b(D|ED|EDC|EDX)\s*\((.*)', $src); $paramtokens = token_get_all("