summaryrefslogtreecommitdiffstats
path: root/73.patch
diff options
context:
space:
mode:
Diffstat (limited to '73.patch')
-rw-r--r--73.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/73.patch b/73.patch
new file mode 100644
index 0000000..f7e9e42
--- /dev/null
+++ b/73.patch
@@ -0,0 +1,31 @@
+From a012b849d0a382c7f4ef3c1249f2ec6aec0ff7a9 Mon Sep 17 00:00:00 2001
+From: Tyson Andre <tysonandre775@hotmail.com>
+Date: Wed, 12 Jul 2017 08:45:54 -0700
+Subject: [PATCH] Stop creating inaccessible global constants "0" and "1"
+
+This was a side effect of the macro that was used to declare constants
+for the values of the stringified version of the constant name.
+
+`get_defined_constants(true)['mosquitto']` can be used to show the old
+constants (`["MOSQ_LOG_INFO"] => 1, ..., "0" => 0, "1" => 1]`)
+---
+ mosquitto.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mosquitto.c b/mosquitto.c
+index d1e105f..7341728 100644
+--- a/mosquitto.c
++++ b/mosquitto.c
+@@ -1451,9 +1451,9 @@ PHP_MINIT_FUNCTION(mosquitto)
+ REGISTER_MOSQUITTO_LONG_CONST("LOG_WARNING", MOSQ_LOG_WARNING);
+ REGISTER_MOSQUITTO_LONG_CONST("LOG_ERR", MOSQ_LOG_ERR);
+ REGISTER_MOSQUITTO_LONG_CONST("LOG_DEBUG", MOSQ_LOG_DEBUG);
+-
+- REGISTER_MOSQUITTO_LONG_CONST("SSL_VERIFY_NONE", 0);
+- REGISTER_MOSQUITTO_LONG_CONST("SSL_VERIFY_PEER", 1);
++
++ zend_declare_class_constant_long(mosquitto_ce_client, "SSL_VERIFY_NONE", sizeof("SSL_VERIFY_NONE")-1, 0 TSRMLS_CC);
++ zend_declare_class_constant_long(mosquitto_ce_client, "SSL_VERIFY_PEER", sizeof("SSL_VERIFY_PEER")-1, 1 TSRMLS_CC);
+
+ mosquitto_lib_init();
+