]> granicus.if.org Git - php/commitdiff
Reduce var scope
authorAnatol Belski <ab@php.net>
Wed, 14 Mar 2018 21:59:54 +0000 (22:59 +0100)
committerAnatol Belski <ab@php.net>
Wed, 14 Mar 2018 21:59:54 +0000 (22:59 +0100)
ext/soap/soap.c

index 11ca1c76eed3848a0e388c69b932e88453a232dc..01ecc9a540661e56b2bbf43a558784f548a12f72 100644 (file)
@@ -1532,7 +1532,7 @@ PHP_METHOD(SoapServer, handle)
        xmlCharEncodingHandlerPtr old_encoding;
        HashTable *old_class_map, *old_typemap;
        int old_features;
-       zval tmp_soap, *tmp_soap_p;
+       zval tmp_soap;
 
        SOAP_SERVER_BEGIN_CODE();
 
@@ -1696,7 +1696,7 @@ PHP_METHOD(SoapServer, handle)
 #if 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;
+                       zval *session_vars, *tmp_soap_p;
 
                        if (PS(session_status) != php_session_active &&
                            PS(session_status) != php_session_disabled) {
@@ -1768,7 +1768,7 @@ PHP_METHOD(SoapServer, handle)
 #if 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);
+                               zval *session_vars = &PS(http_session_vars), *tmp_soap_p;
 
                                ZVAL_DEREF(session_vars);
                                if (Z_TYPE_P(session_vars) == IS_ARRAY &&