From: Tim Starling Date: Wed, 30 Jun 2010 05:30:29 +0000 (+0000) Subject: Fix error suppression from r63209. X-Git-Tag: 1.31.0-rc.0~36338 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=ed42245c4047cf174fb27f19bf0d47cad6bf2fcc;p=lhc%2Fweb%2Fwiklou.git Fix error suppression from r63209. --- diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index 405f72d8bb..8a3ab4ef11 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -881,7 +881,13 @@ abstract class Installer { } public function installSecretKey() { - $file = wfIsWindows() ? null : @fopen( "/dev/urandom", "r" ); + if ( wfIsWindows() ) { + $file = null; + } else { + wfSuppressWarnings(); + $file = fopen( "/dev/urandom", "r" ); + wfRestoreWarnings(); + } if ( $file ) { $secretKey = bin2hex( fread( $file, 32 ) ); fclose( $file );