]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in SOAP extension
authorGeorge Peter Banyard <girgias@php.net>
Wed, 20 May 2020 12:41:14 +0000 (14:41 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Wed, 20 May 2020 14:29:51 +0000 (16:29 +0200)
ext/soap/php_soap.h
ext/soap/soap.c

index ffc352a8f285179d33ab6886ac95674cac092ac5..652174fb3d34e5cbea6d7f1f92f3368cd712c946 100644 (file)
@@ -23,7 +23,7 @@
 #include "php_globals.h"
 #include "ext/standard/info.h"
 #include "ext/standard/php_standard.h"
-#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
+#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
 #include "ext/session/php_session.h"
 #endif
 #include "zend_smart_str.h"
index a93813e9d186999b189ca93b8b7966e6fe8e92dc..57b912fd0e0ff89761090e83d54479bbbdd16cc8 100644 (file)
@@ -20,7 +20,7 @@
 #include "config.h"
 #endif
 #include "php_soap.h"
-#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
+#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
 #include "ext/session/php_session.h"
 #endif
 #include "soap_arginfo.h"
@@ -1403,7 +1403,7 @@ PHP_METHOD(SoapServer, handle)
                soap_obj = &service->soap_object;
                function_table = &((Z_OBJCE_P(soap_obj))->function_table);
        } else if (service->type == SOAP_CLASS) {
-#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
+#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
                /* If persistent then set soap_obj from from the previous created session (if available) */
                if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
                        zval *session_vars, *tmp_soap_p;
@@ -1475,7 +1475,7 @@ PHP_METHOD(SoapServer, handle)
                                }
                                efree(class_name);
                        }
-#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
+#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
                        /* If session then update session hash with new object */
                        if (service->soap_class.persistence == SOAP_PERSISTENCE_SESSION) {
                                zval *session_vars = &PS(http_session_vars), *tmp_soap_p;
@@ -1566,7 +1566,7 @@ PHP_METHOD(SoapServer, handle)
                if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
                        call_status = call_user_function(NULL, soap_obj, &function_name, &retval, num_params, params);
                        if (service->type == SOAP_CLASS) {
-#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
+#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
                                if (service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
                                        zval_ptr_dtor(soap_obj);
                                        soap_obj = NULL;
@@ -1588,7 +1588,7 @@ PHP_METHOD(SoapServer, handle)
                php_output_discard();
                _soap_server_exception(service, function, ZEND_THIS);
                if (service->type == SOAP_CLASS) {
-#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
+#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
                        if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
 #else
                        if (soap_obj) {
@@ -1627,7 +1627,7 @@ PHP_METHOD(SoapServer, handle)
                php_output_discard();
                _soap_server_exception(service, function, ZEND_THIS);
                if (service->type == SOAP_CLASS) {
-#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
+#if defined(HAVE_PHP_SESSION) && !defined(COMPILE_DL_SESSION)
                        if (soap_obj && service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
 #else
                        if (soap_obj) {