summaryrefslogtreecommitdiffstats
path: root/uwsgi_fix_php81.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-10-17 16:45:29 +0200
committerRemi Collet <remi@php.net>2022-10-17 16:45:29 +0200
commit6e5d7189a9e051f5ead5082ada51c876e99bac74 (patch)
tree2df75a084cd074913aa2edc6ad4a6d973efa3a26 /uwsgi_fix_php81.patch
parentacaddc96ccc610d6fe4f1a24c89915c1974009d1 (diff)
add upstream patch for PHP 8.2
Diffstat (limited to 'uwsgi_fix_php81.patch')
-rw-r--r--uwsgi_fix_php81.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/uwsgi_fix_php81.patch b/uwsgi_fix_php81.patch
new file mode 100644
index 0000000..81d9025
--- /dev/null
+++ b/uwsgi_fix_php81.patch
@@ -0,0 +1,42 @@
+From 8ca18da9a01eee19156243c5c0d28d2572698e4a Mon Sep 17 00:00:00 2001
+From: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
+Date: Sun, 30 Jan 2022 14:31:50 +0100
+Subject: [PATCH] plugins/php: handle php8.1 zend_file_handle signature change
+
+filename is now a zend_string.
+
+Refs #2394
+---
+ plugins/php/php_plugin.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/plugins/php/php_plugin.c b/plugins/php/php_plugin.c
+index d336adddc..8b5a24156 100644
+--- a/plugins/php/php_plugin.c
++++ b/plugins/php/php_plugin.c
+@@ -1096,14 +1096,19 @@ int uwsgi_php_request(struct wsgi_request *wsgi_req) {
+
+ SG(request_info).path_translated = wsgi_req->file;
+
+- memset(&file_handle, 0, sizeof(zend_file_handle));
+- file_handle.type = ZEND_HANDLE_FILENAME;
+- file_handle.filename = real_filename;
++#if PHP_VERSION_ID >= 80100
++ zend_string *handle_filename = zend_string_init(real_filename, real_filename_len, 0);
++#else
++ const char *handle_filename = real_filename;
++#endif
++ memset(&file_handle, 0, sizeof(zend_file_handle));
++ file_handle.type = ZEND_HANDLE_FILENAME;
++ file_handle.filename = handle_filename;
+
+- if (php_request_startup() == FAILURE) {
++ if (php_request_startup() == FAILURE) {
+ uwsgi_500(wsgi_req);
+- return -1;
+- }
++ return -1;
++ }
+
+ struct uwsgi_string_list *usl=NULL;
+