From 57b345f16ccad6e5b273c58e819ca5adefdcbf72 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 20 Mar 2022 18:43:35 +0100 Subject: Fix compilation on PHP<7.2 --- src/sp_unserialize.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/sp_unserialize.c') 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 zend_string_release_ex(algo, 0); #endif +#if PHP_VERSION_ID < 70200 + if (!ops) { +#else if (!ops || !ops->is_crypto) { +#endif sp_log_err("hmac", "unsupported hash algorithm: sha256"); return NULL; } -- cgit v1.3