From: Ariel Glenn Date: Sun, 12 Jun 2011 12:02:53 +0000 (+0000) Subject: safer check if mhash is available (and I'm about to make it unavailable by disabling... X-Git-Tag: 1.31.0-rc.0~29567 X-Git-Url: http://git.cyclocoop.org//%22%22.url_de_base%28%29.%22/%22?a=commitdiff_plain;h=e78187eba2e9d08c077e5d5a6116f8c16c6c8b6a;p=lhc%2Fweb%2Fwiklou.git safer check if mhash is available (and I'm about to make it unavailable by disabling the fn in the php.ini for lucid builds) --- diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index f707b3f6a5..7535a0d0dc 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -516,7 +516,7 @@ class DiffHistoryBlob implements HistoryBlob { $header = unpack( 'Vofp/Vcsize', substr( $diff, 0, 8 ) ); # Check the checksum if mhash is available - if ( extension_loaded( 'mhash' ) ) { + if ( function_exists( 'mhash' ) ) { $ofp = mhash( MHASH_ADLER32, $base ); if ( $ofp !== substr( $diff, 0, 4 ) ) { wfDebug( __METHOD__. ": incorrect base checksum\n" );