SF Patch #3054517 - Suppress PHP 5.3 E_DEPRECATED exceptions

This commit is contained in:
Patrick MONNERAT
2010-11-16 20:47:07 +11:00
committed by Deon George
parent f9c56bc4ff
commit ab0717e0e3
2 changed files with 13 additions and 8 deletions

View File

@@ -58,8 +58,11 @@ if (! function_exists('mhash') && ! function_exists('mhash_keygen_s2k')) {
function openssl_hash($openssl_hash_id,$password_clear) {
global $emuhash_emu;
$current_magic_quotes = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);
if (PHP_VERSION < 6) {
$current_magic_quotes = @get_magic_quotes_runtime();
@set_magic_quotes_runtime(0);
}
$tmpfile = tempnam($emuhash_emu['tmpdir'],'emuhash');
$pwhandle = fopen($tmpfile,'w');
@@ -73,7 +76,9 @@ if (! function_exists('mhash') && ! function_exists('mhash_keygen_s2k')) {
$pass = fread($prog,1024);
pclose($prog);
unlink($tmpfile);
set_magic_quotes_runtime($current_magic_quotes);
if (PHP_VERSION < 6)
@set_magic_quotes_runtime($current_magic_quotes);
return $pass;
}