summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/plugins/php/weechat-php.c6
2 files changed, 3 insertions, 4 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 6c9fba808..357f1e854 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -35,6 +35,7 @@ Bug fixes::
* irc: case-insensitive comparison on incoming CTCP command, force upper case on CTCP replies (issue #1439)
* irc: fix memory leak when the channel topic is changed
* logger: fix crash when logging is disabled on a buffer and the log file was deleted in the meanwhile, when option logger.file.info_lines is on (issue #1444)
+ * php: fix crash when loading script with PHP 7.4 (issue #1452)
* relay: update buffers synchronization when buffers are renamed (issue #1428)
* script: fix memory leak in read of script repository file if it has invalid content
* script: fix unexpected display of scripts list in buffer with command /script list -i
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c
index 7ef1b0d21..189c51689 100644
--- a/src/plugins/php/weechat-php.c
+++ b/src/plugins/php/weechat-php.c
@@ -687,11 +687,9 @@ weechat_php_load (const char *filename, const char *code)
php_registered_script = NULL;
php_current_script_filename = filename;
- file_handle.filename = filename;
- file_handle.free_filename = 0;
+ memset (&file_handle, 0, sizeof (file_handle));
file_handle.type = ZEND_HANDLE_FILENAME;
- file_handle.opened_path = NULL;
- file_handle.handle.fp = NULL;
+ file_handle.filename = filename;
zend_try
{