@@ -1906,9 +1906,11 @@ static bool php_phongo_apply_wc_options_to_client(mongoc_client_t *client, bson_
1906
1906
static mongoc_client_t * php_phongo_make_mongo_client (php_phongo_manager_t * manager , const mongoc_uri_t * uri , zval * driverOptions TSRMLS_DC ) /* {{{ */
1907
1907
{
1908
1908
#if PHP_VERSION_ID >= 70000
1909
- zval * tmp ;
1909
+ zval * zdebug = NULL ;
1910
+ zval * zcontext = NULL ;
1910
1911
#else
1911
- zval * * tmp ;
1912
+ zval * * zdebug = NULL ;
1913
+ zval * * zcontext = NULL ;
1912
1914
#endif
1913
1915
php_stream_context * ctx = NULL ;
1914
1916
const char * mech , * mongoc_version , * bson_version ;
@@ -1917,27 +1919,27 @@ static mongoc_client_t *php_phongo_make_mongo_client(php_phongo_manager_t *manag
1917
1919
ENTRY ;
1918
1920
1919
1921
#if PHP_VERSION_ID >= 70000
1920
- if (driverOptions && (tmp = zend_hash_str_find (Z_ARRVAL_P (driverOptions ), "debug" , sizeof ("debug" )- 1 )) != NULL ) {
1922
+ if (driverOptions && (zdebug = zend_hash_str_find (Z_ARRVAL_P (driverOptions ), "debug" , sizeof ("debug" )- 1 )) != NULL ) {
1921
1923
zend_string * key = zend_string_init (PHONGO_DEBUG_INI , sizeof (PHONGO_DEBUG_INI )- 1 , 0 );
1922
- zend_string * value_str = zval_get_string (tmp );
1924
+ zend_string * value_str = zval_get_string (zdebug );
1923
1925
zend_alter_ini_entry_ex (key , value_str , PHP_INI_USER , PHP_INI_STAGE_RUNTIME , 0 );
1924
1926
zend_string_release (key );
1925
1927
zend_string_release (value_str );
1926
1928
}
1927
1929
#else
1928
- if (driverOptions && zend_hash_find (Z_ARRVAL_P (driverOptions ), "debug" , strlen ("debug" ) + 1 , (void * * )& tmp ) == SUCCESS ) {
1929
- convert_to_string (* tmp );
1930
+ if (driverOptions && zend_hash_find (Z_ARRVAL_P (driverOptions ), "debug" , strlen ("debug" ) + 1 , (void * * )& zdebug ) == SUCCESS ) {
1931
+ convert_to_string (* zdebug );
1930
1932
1931
- zend_alter_ini_entry_ex ((char * )PHONGO_DEBUG_INI , sizeof (PHONGO_DEBUG_INI ), Z_STRVAL_PP (tmp ), Z_STRLEN_PP (tmp ), PHP_INI_USER , PHP_INI_STAGE_RUNTIME , 0 TSRMLS_CC );
1933
+ zend_alter_ini_entry_ex ((char * )PHONGO_DEBUG_INI , sizeof (PHONGO_DEBUG_INI ), Z_STRVAL_PP (zdebug ), Z_STRLEN_PP (zdebug ), PHP_INI_USER , PHP_INI_STAGE_RUNTIME , 0 TSRMLS_CC );
1932
1934
}
1933
1935
#endif
1934
1936
1935
1937
#if PHP_VERSION_ID >= 70000
1936
- if (driverOptions && (tmp = zend_hash_str_find (Z_ARRVAL_P (driverOptions ), "context" , sizeof ("context" )- 1 )) != NULL ) {
1937
- ctx = php_stream_context_from_zval (tmp , 0 );
1938
+ if (driverOptions && (zcontext = zend_hash_str_find (Z_ARRVAL_P (driverOptions ), "context" , sizeof ("context" )- 1 )) != NULL ) {
1939
+ ctx = php_stream_context_from_zval (zcontext , 0 );
1938
1940
#else
1939
- if (driverOptions && zend_hash_find (Z_ARRVAL_P (driverOptions ), "context" , strlen ("context" ) + 1 , (void * * )& tmp ) == SUCCESS ) {
1940
- ctx = php_stream_context_from_zval (* tmp , 0 );
1941
+ if (driverOptions && zend_hash_find (Z_ARRVAL_P (driverOptions ), "context" , strlen ("context" ) + 1 , (void * * )& zcontext ) == SUCCESS ) {
1942
+ ctx = php_stream_context_from_zval (* zcontext , 0 );
1941
1943
#endif
1942
1944
} else {
1943
1945
ctx = FG (default_context ) ? FG (default_context ) : php_stream_context_alloc (TSRMLS_C );
0 commit comments