Last modified: 2011-12-10 19:17:16 UTC
As reported on IRC: $ php /var/www/mediawiki/maintenance/update.php PHP Fatal error: Cannot redeclare posix_isatty() in /var/www/mediawiki/maintenance/Maintenance.php on line 27 Weird, since posix_isatty() should be wrapped in a function_exists() check.
IIRC it's actually possible to disable functions from php.ini, in which case they don't turn up on function_exists() but you can't redeclare them. (Reflection may do better at finding them to confirm existence.) Of course this'd be a pretty weird thing to disable...
Created attachment 8874 [details] posix_isatty() patch Rather than doing a conditional function define (which HipHop won't like anyway), I just threw it in a wrapper method in Maintenance. Nothing in extensions calls this--and few core maintenance scripts even do--so the impact should be minimal. Just asking for a quick sanity check that this will work as intended.
That patch looks plenty sane, Chad, should work as intended. I feel bad about the !$fd hack, but that's just the part of me that wants to be a good person and have readable code ;) +reviewed
Done in r30172.
I think you mean r93789. If not, I'm wondering where you found the time machine?
Would it be possible to backport this to 1.18? I'm currently unable to upgrade my wiki because of this bug. Thanks.