Skip to content

Instantly share code, notes, and snippets.

@adsr
Created August 7, 2021 23:35
Show Gist options
  • Select an option

  • Save adsr/7e4bab7ab7b7d8b7e9d2746334807120 to your computer and use it in GitHub Desktop.

Select an option

Save adsr/7e4bab7ab7b7d8b7e9d2746334807120 to your computer and use it in GitHub Desktop.
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c
index d303367a6..942bac425 100644
--- a/src/plugins/php/weechat-php.c
+++ b/src/plugins/php/weechat-php.c
@@ -700,7 +700,11 @@ weechat_php_load (const char *filename, const char *code)
memset (&file_handle, 0, sizeof (file_handle));
file_handle.type = ZEND_HANDLE_FILENAME;
+#if PHP_VERSION_ID >= 80100
file_handle.filename = zend_string_init(filename, strlen(filename), 0);
+#else
+ file_handle.filename = filename;
+#endif
zend_try
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment