@@ -121,11 +121,7 @@ static php_stream *
121
121
MYSQLND_METHOD (mysqlnd_vio , open_pipe )(MYSQLND_VIO * const vio , const MYSQLND_CSTRING scheme , const zend_bool persistent ,
122
122
MYSQLND_STATS * const conn_stats , MYSQLND_ERROR_INFO * const error_info )
123
123
{
124
- #if PHP_API_VERSION < 20100412
125
- unsigned int streams_options = ENFORCE_SAFE_MODE ;
126
- #else
127
124
unsigned int streams_options = 0 ;
128
- #endif
129
125
dtor_func_t origin_dtor ;
130
126
php_stream * net_stream = NULL ;
131
127
@@ -160,11 +156,7 @@ static php_stream *
160
156
MYSQLND_METHOD (mysqlnd_vio , open_tcp_or_unix )(MYSQLND_VIO * const vio , const MYSQLND_CSTRING scheme , const zend_bool persistent ,
161
157
MYSQLND_STATS * const conn_stats , MYSQLND_ERROR_INFO * const error_info )
162
158
{
163
- #if PHP_API_VERSION < 20100412
164
- unsigned int streams_options = ENFORCE_SAFE_MODE ;
165
- #else
166
159
unsigned int streams_options = 0 ;
167
- #endif
168
160
unsigned int streams_flags = STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT ;
169
161
char * hashed_details = NULL ;
170
162
int hashed_details_len = 0 ;
@@ -566,11 +558,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net)
566
558
php_stream_context_set_option (context , "ssl" , "allow_self_signed" , & verify_peer_zval );
567
559
}
568
560
}
569
- #if PHP_API_VERSION >= 20131106
570
- php_stream_context_set (net_stream , context );
571
- #else
572
561
php_stream_context_set (net_stream , context );
573
- #endif
574
562
if (php_stream_xport_crypto_setup (net_stream , STREAM_CRYPTO_METHOD_TLS_CLIENT , NULL ) < 0 ||
575
563
php_stream_xport_crypto_enable (net_stream , 1 ) < 0 )
576
564
{
@@ -586,11 +574,7 @@ MYSQLND_METHOD(mysqlnd_vio, enable_ssl)(MYSQLND_VIO * const net)
586
574
of the context, which means usage of already freed memory, bad. Actually we don't need this
587
575
context anymore after we have enabled SSL on the connection. Thus it is very simple, we remove it.
588
576
*/
589
- #if PHP_API_VERSION >= 20131106
590
577
php_stream_context_set (net_stream , NULL );
591
- #else
592
- php_stream_context_set (net_stream , NULL );
593
- #endif
594
578
595
579
if (net -> data -> options .timeout_read ) {
596
580
struct timeval tv ;
0 commit comments