1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Conditionalize hash_hmac tests for 5.0

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
Edward Z. Yang
2013-10-28 16:48:07 -07:00
committed by Edward Z. Yang
parent 0beecad78a
commit 8cd08620dc
5 changed files with 15 additions and 7 deletions

View File

@@ -48,7 +48,7 @@ class HTMLPurifier_URIFilter_Munge extends HTMLPurifier_URIFilter
$this->doEmbed = $config->get('URI.MungeResources');
$this->secretKey = $config->get('URI.MungeSecretKey');
if ($this->secretKey && !function_exists('hash_hmac')) {
trigger_error("Cannot use %URI.MungeSecretKey without hash_hmac support.", E_USER_ERROR);
throw new Exception("Cannot use %URI.MungeSecretKey without hash_hmac support.");
}
return true;
}