summaryrefslogtreecommitdiff
path: root/src/sp_unserialize.c
diff options
context:
space:
mode:
authorjvoisin2022-03-20 18:43:35 +0100
committerjvoisin2022-03-20 19:07:35 +0100
commit57b345f16ccad6e5b273c58e819ca5adefdcbf72 (patch)
tree4ee854853720a8a559ed7d34c977be8f42ff2bb6 /src/sp_unserialize.c
parent70aae5917737e42f392edc00ceb7af35b7740eb8 (diff)
Fix compilation on PHP<7.2
Diffstat (limited to 'src/sp_unserialize.c')
-rw-r--r--src/sp_unserialize.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c
index c2173d3..2e7c173 100644
--- a/src/sp_unserialize.c
+++ b/src/sp_unserialize.c
@@ -18,7 +18,11 @@ static zend_string *sp_do_hash_hmac_sha256(char *data, size_t data_len, char *ke
18 zend_string_release_ex(algo, 0); 18 zend_string_release_ex(algo, 0);
19#endif 19#endif
20 20
21#if PHP_VERSION_ID < 70200
22 if (!ops) {
23#else
21 if (!ops || !ops->is_crypto) { 24 if (!ops || !ops->is_crypto) {
25#endif
22 sp_log_err("hmac", "unsupported hash algorithm: sha256"); 26 sp_log_err("hmac", "unsupported hash algorithm: sha256");
23 return NULL; 27 return NULL;
24 } 28 }