r38833 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38832‎ | r38833 | r38834 >
Date:03:32, 8 August 2008
Author:tstarling
Status:old
Tags:
Comment:
Workaround for PHP 5.2.6 escapeshellcmd()/escapeshellarg() bug
Modified paths:
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -114,6 +114,15 @@
115115 }
116116 }
117117
 118+/**
 119+ * Workaround for http://bugs.php.net/bug.php?id=45132
 120+ * escapeshellarg() destroys non-ASCII characters if LANG is not a UTF-8 locale
 121+ */
 122+if ( version_compare( PHP_VERSION, '5.2.6', '>=' ) ) {
 123+ putenv( 'LC_CTYPE=en_US.UTF-8' );
 124+ setlocale( LC_CTYPE, 'en_US.UTF-8' );
 125+}
 126+
118127 if ( !class_exists( 'AutoLoader' ) ) {
119128 require_once( "$IP/includes/AutoLoader.php" );
120129 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r38837Backported the following:...tstarling04:02, 8 August 2008

Status & tagging log