@@ -350,39 +350,35 @@ static bool php_zip_parse_options(HashTable *options, zip_options *opts)
350
350
351
351
if ((option = zend_hash_str_find (options , "remove_all_path" , sizeof ("remove_all_path" ) - 1 )) != NULL ) {
352
352
if (Z_TYPE_P (option ) != IS_FALSE && Z_TYPE_P (option ) != IS_TRUE ) {
353
- zend_type_error ( "Option \"remove_all_path\" must be of type bool, %s given" ,
353
+ php_error_docref ( NULL , E_WARNING , "Option \"remove_all_path\" must be of type bool, %s given" ,
354
354
zend_zval_type_name (option ));
355
- return false;
356
355
}
357
- opts -> remove_all_path = Z_LVAL_P (option );
356
+ opts -> remove_all_path = zval_get_long (option );
358
357
}
359
358
360
359
if ((option = zend_hash_str_find (options , "comp_method" , sizeof ("comp_method" ) - 1 )) != NULL ) {
361
360
if (Z_TYPE_P (option ) != IS_LONG ) {
362
- zend_type_error ( "Option \"comp_method\" must be of type int, %s given" ,
361
+ php_error_docref ( NULL , E_WARNING , "Option \"comp_method\" must be of type int, %s given" ,
363
362
zend_zval_type_name (option ));
364
- return false;
365
363
}
366
- opts -> comp_method = Z_LVAL_P (option );
364
+ opts -> comp_method = zval_get_long (option );
367
365
368
366
if ((option = zend_hash_str_find (options , "comp_flags" , sizeof ("comp_flags" ) - 1 )) != NULL ) {
369
367
if (Z_TYPE_P (option ) != IS_LONG ) {
370
- zend_type_error ( "Option \"comp_flags\" must be of type int, %s given" ,
368
+ php_error_docref ( NULL , E_WARNING , "Option \"comp_flags\" must be of type int, %s given" ,
371
369
zend_zval_type_name (option ));
372
- return false;
373
370
}
374
- opts -> comp_flags = Z_LVAL_P (option );
371
+ opts -> comp_flags = zval_get_long (option );
375
372
}
376
373
}
377
374
378
375
#ifdef HAVE_ENCRYPTION
379
376
if ((option = zend_hash_str_find (options , "enc_method" , sizeof ("enc_method" ) - 1 )) != NULL ) {
380
377
if (Z_TYPE_P (option ) != IS_LONG ) {
381
- zend_type_error ( "Option \"enc_method\" must be of type int, %s given" ,
378
+ php_error_docref ( NULL , E_WARNING , "Option \"enc_method\" must be of type int, %s given" ,
382
379
zend_zval_type_name (option ));
383
- return false;
384
380
}
385
- opts -> enc_method = Z_LVAL_P (option );
381
+ opts -> enc_method = zval_get_long (option );
386
382
387
383
if ((option = zend_hash_str_find (options , "enc_password" , sizeof ("enc_password" ) - 1 )) != NULL ) {
388
384
if (Z_TYPE_P (option ) != IS_STRING ) {
0 commit comments