Skip to content

Commit bb12ed7

Browse files
committed
Revert "Promote newly introduced warnings to TypeError in case of strict_types"
This reverts commit 9cefc06.
1 parent 9cefc06 commit bb12ed7

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

ext/zip/php_zip.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,6 @@ static bool php_zip_parse_options(HashTable *options, zip_options *opts)
350350

351351
if ((option = zend_hash_str_find(options, "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
352352
if (Z_TYPE_P(option) != IS_FALSE && Z_TYPE_P(option) != IS_TRUE) {
353-
if (ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))) {
354-
zend_type_error("Option \"comp_method\" must be of type bool, %s given",
355-
zend_zval_type_name(option));
356-
return false;
357-
}
358353
php_error_docref(NULL, E_WARNING, "Option \"remove_all_path\" must be of type bool, %s given",
359354
zend_zval_type_name(option));
360355
}
@@ -363,23 +358,13 @@ static bool php_zip_parse_options(HashTable *options, zip_options *opts)
363358

364359
if ((option = zend_hash_str_find(options, "comp_method", sizeof("comp_method") - 1)) != NULL) {
365360
if (Z_TYPE_P(option) != IS_LONG) {
366-
if (ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))) {
367-
zend_type_error("Option \"comp_method\" must be of type int, %s given",
368-
zend_zval_type_name(option));
369-
return false;
370-
}
371361
php_error_docref(NULL, E_WARNING, "Option \"comp_method\" must be of type int, %s given",
372362
zend_zval_type_name(option));
373363
}
374364
opts->comp_method = zval_get_long(option);
375365

376366
if ((option = zend_hash_str_find(options, "comp_flags", sizeof("comp_flags") - 1)) != NULL) {
377367
if (Z_TYPE_P(option) != IS_LONG) {
378-
if (ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))) {
379-
zend_type_error("Option \"comp_flags\" must be of type int, %s given",
380-
zend_zval_type_name(option));
381-
return false;
382-
}
383368
php_error_docref(NULL, E_WARNING, "Option \"comp_flags\" must be of type int, %s given",
384369
zend_zval_type_name(option));
385370
}
@@ -390,11 +375,6 @@ static bool php_zip_parse_options(HashTable *options, zip_options *opts)
390375
#ifdef HAVE_ENCRYPTION
391376
if ((option = zend_hash_str_find(options, "enc_method", sizeof("enc_method") - 1)) != NULL) {
392377
if (Z_TYPE_P(option) != IS_LONG) {
393-
if (ZEND_CALL_USES_STRICT_TYPES(EG(current_execute_data))) {
394-
zend_type_error("Option \"enc_method\" must be of type int, %s given",
395-
zend_zval_type_name(option));
396-
return false;
397-
}
398378
php_error_docref(NULL, E_WARNING, "Option \"enc_method\" must be of type int, %s given",
399379
zend_zval_type_name(option));
400380
}

0 commit comments

Comments
 (0)