Patch fix_php7.1_compat.patch for stomp Bug #73748
Patch version 2017-05-01 23:25 UTC
Return to Bug #73748 |
Download this patch
Patch Revisions:
Developer: nish.aravamudan@canonical.com
Description: Fixes for PHP7.1 BC-breaking changes
Author: Nishanth Aravamudan <nish.aravamudan@canonical.com>
Forwarded:
Last-Update: 2017-05-01
--- a/stomp-2.0.0/php_stomp.c
+++ b/stomp-2.0.0/php_stomp.c
@@ -952,6 +952,11 @@
object_init_ex(return_value, ce);
if (ce->constructor) {
+#if PHP_VERSION_ID < 70100
+ zend_class_entry *scope = EG(scope);
+#else
+ zend_class_entry *scope = zend_get_executed_scope();
+#endif
zval cmd, body;
ZVAL_STRINGL(&cmd, res->command, res->command_length);
@@ -963,8 +968,10 @@
}
fci.size = sizeof(fci);
+#if PHP_VERSION_ID < 70100
fci.function_table = &ce->function_table;
fci.symbol_table = NULL;
+#endif
/* PARAMS */
fci.param_count = 3;
@@ -980,7 +987,7 @@
fcc.initialized = 1;
fcc.function_handler = ce->constructor;
- fcc.calling_scope = EG(scope);
+ fcc.calling_scope = scope;
fcc.object = Z_OBJ_P(return_value);
if (zend_call_function(&fci, &fcc ) == FAILURE) {
|