aports/testing/php83-brotli/fix-warning.patch
2023-06-13 14:11:19 +02:00

27 lines
856 B
Diff

atch-Source: https://github.com/kjdev/php-ext-brotli/pull/44
From 5cf15525c430fca7f0d8c491b809d354354af5a8 Mon Sep 17 00:00:00 2001
From: Andy Postnikov <apostnikov@gmail.com>
Date: Tue, 13 Jun 2023 14:05:35 +0200
Subject: [PATCH] replace deprecated zend_atoi
---
brotli.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/brotli.c b/brotli.c
index f8b84c1..fac0001 100644
--- a/brotli.c
+++ b/brotli.c
@@ -486,7 +486,11 @@ static PHP_INI_MH(OnUpdate_brotli_output_compression)
int_value = 0;
} else if (!strncasecmp(ZSTR_VAL(new_value), "on", sizeof("on"))) {
int_value = 1;
+#if PHP_VERSION_ID >= 80200
+ } else if (zend_ini_parse_quantity_warn(new_value, entry->name)) {
+#else
} else if (zend_atoi(ZSTR_VAL(new_value), ZSTR_LEN(new_value))) {
+#endif
int_value = 1;
} else {
int_value = 0;