diff options
| author | Christian Göttsche | 2024-05-30 20:23:10 +0200 |
|---|---|---|
| committer | jvoisin | 2024-06-06 16:29:55 +0200 |
| commit | 381aa67af284e421ce6554e7bf6039dda5e674b9 (patch) | |
| tree | 3d374e56642d949524b0608320bd5b009a36bee0 | |
| parent | 3b20c3269df54bf5f3c0896017c8a78515874b29 (diff) | |
Silence unused variable warning with php 8.3
src/sp_unserialize.c: In function 'zif_sp_unserialize':
src/sp_unserialize.c:131:15: warning: unused variable 'orig_handler' [-Wunused-variable]
131 | zif_handler orig_handler = zend_hash_str_find_ptr(SPG(sp_internal_functions_hook), ZEND_STRL("unserialize"));
| ^~~~~~~~~~~~
| -rw-r--r-- | src/sp_unserialize.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sp_unserialize.c b/src/sp_unserialize.c index ab0d9ed..4442997 100644 --- a/src/sp_unserialize.c +++ b/src/sp_unserialize.c | |||
| @@ -128,7 +128,9 @@ PHP_FUNCTION(sp_unserialize) { | |||
| 128 | } | 128 | } |
| 129 | } else { status = 1; } | 129 | } else { status = 1; } |
| 130 | 130 | ||
| 131 | #if ! (PHP_VERSION_ID >= 80300) | ||
| 131 | zif_handler orig_handler = zend_hash_str_find_ptr(SPG(sp_internal_functions_hook), ZEND_STRL("unserialize")); | 132 | zif_handler orig_handler = zend_hash_str_find_ptr(SPG(sp_internal_functions_hook), ZEND_STRL("unserialize")); |
| 133 | #endif | ||
| 132 | if (0 == status) { | 134 | if (0 == status) { |
| 133 | #if PHP_VERSION_ID >= 80300 | 135 | #if PHP_VERSION_ID >= 80300 |
| 134 | // PHP8.3 gives a warning about trailing data in unserialize strings. | 136 | // PHP8.3 gives a warning about trailing data in unserialize strings. |
