@@ -2278,11 +2278,11 @@ ZEND_INI_MH(OnUpdateDebug)
2278
2278
MONGODB_G (debug_fd ) = NULL ;
2279
2279
}
2280
2280
2281
- if (!new_value_length
2282
- || strcasecmp ("0" , new_value ) == 0
2283
- || strcasecmp ("off" , new_value ) == 0
2284
- || strcasecmp ("no" , new_value ) == 0
2285
- || strcasecmp ("false" , new_value ) == 0
2281
+ if (!new_value || ( new_value && ! phongo_str ( new_value )[ 0 ])
2282
+ || strcasecmp ("0" , phongo_str ( new_value ) ) == 0
2283
+ || strcasecmp ("off" , phongo_str ( new_value ) ) == 0
2284
+ || strcasecmp ("no" , phongo_str ( new_value ) ) == 0
2285
+ || strcasecmp ("false" , phongo_str ( new_value ) ) == 0
2286
2286
) {
2287
2287
mongoc_log_trace_disable ();
2288
2288
mongoc_log_set_handler (NULL , NULL );
@@ -2291,34 +2291,35 @@ ZEND_INI_MH(OnUpdateDebug)
2291
2291
}
2292
2292
2293
2293
2294
- if (strcasecmp (new_value , "stderr" ) == 0 ) {
2294
+ if (strcasecmp (phongo_str ( new_value ) , "stderr" ) == 0 ) {
2295
2295
MONGODB_G (debug_fd ) = stderr ;
2296
- } else if (strcasecmp (new_value , "stdout" ) == 0 ) {
2296
+ } else if (strcasecmp (phongo_str ( new_value ) , "stdout" ) == 0 ) {
2297
2297
MONGODB_G (debug_fd ) = stdout ;
2298
2298
} else if (
2299
- strcasecmp ("1" , new_value ) == 0
2300
- || strcasecmp ("on" , new_value ) == 0
2301
- || strcasecmp ("yes" , new_value ) == 0
2302
- || strcasecmp ("true" , new_value ) == 0
2299
+ strcasecmp ("1" , phongo_str ( new_value ) ) == 0
2300
+ || strcasecmp ("on" , phongo_str ( new_value ) ) == 0
2301
+ || strcasecmp ("yes" , phongo_str ( new_value ) ) == 0
2302
+ || strcasecmp ("true" , phongo_str ( new_value ) ) == 0
2303
2303
) {
2304
2304
tmp_dir = NULL ;
2305
2305
} else {
2306
- tmp_dir = new_value ;
2306
+ tmp_dir = phongo_str ( new_value ) ;
2307
2307
}
2308
2308
2309
2309
if (!MONGODB_G (debug_fd )) {
2310
2310
time_t t ;
2311
2311
int fd = -1 ;
2312
2312
char * prefix ;
2313
2313
int len ;
2314
- char * filename ;
2314
+ phongo_char * filename ;
2315
2315
2316
2316
time (& t );
2317
2317
len = spprintf (& prefix , 0 , "PHONGO-%ld" , t );
2318
2318
2319
2319
fd = php_open_temporary_fd (tmp_dir , prefix , & filename TSRMLS_CC );
2320
2320
if (fd != -1 ) {
2321
- MONGODB_G (debug_fd ) = VCWD_FOPEN (filename , "a" );
2321
+ const char * path = phongo_str (filename );
2322
+ MONGODB_G (debug_fd ) = VCWD_FOPEN (path , "a" );
2322
2323
}
2323
2324
efree (filename );
2324
2325
efree (prefix );
0 commit comments