mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385)
This commit is contained in:
parent
f8f7fd2db1
commit
7936c8085e
145 changed files with 563 additions and 544 deletions
|
@ -354,7 +354,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
|
|||
if ((option = zend_hash_str_find(options, "remove_all_path", sizeof("remove_all_path") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_FALSE && Z_TYPE_P(option) != IS_TRUE) {
|
||||
php_error_docref(NULL, E_WARNING, "Option \"remove_all_path\" must be of type bool, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
}
|
||||
opts->remove_all_path = zval_get_long(option);
|
||||
}
|
||||
|
@ -362,14 +362,14 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
|
|||
if ((option = zend_hash_str_find(options, "comp_method", sizeof("comp_method") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_LONG) {
|
||||
php_error_docref(NULL, E_WARNING, "Option \"comp_method\" must be of type int, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
}
|
||||
opts->comp_method = zval_get_long(option);
|
||||
|
||||
if ((option = zend_hash_str_find(options, "comp_flags", sizeof("comp_flags") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_LONG) {
|
||||
php_error_docref(NULL, E_WARNING, "Option \"comp_flags\" must be of type int, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
}
|
||||
opts->comp_flags = zval_get_long(option);
|
||||
}
|
||||
|
@ -379,14 +379,14 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
|
|||
if ((option = zend_hash_str_find(options, "enc_method", sizeof("enc_method") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_LONG) {
|
||||
php_error_docref(NULL, E_WARNING, "Option \"enc_method\" must be of type int, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
}
|
||||
opts->enc_method = zval_get_long(option);
|
||||
|
||||
if ((option = zend_hash_str_find(options, "enc_password", sizeof("enc_password") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_STRING) {
|
||||
zend_type_error("Option \"enc_password\" must be of type string, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
return -1;
|
||||
}
|
||||
opts->enc_password = Z_STRVAL_P(option);
|
||||
|
@ -397,7 +397,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
|
|||
if ((option = zend_hash_str_find(options, "remove_path", sizeof("remove_path") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_STRING) {
|
||||
zend_type_error("Option \"remove_path\" must be of type string, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
|
|||
if ((option = zend_hash_str_find(options, "add_path", sizeof("add_path") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_STRING) {
|
||||
zend_type_error("Option \"add_path\" must be of type string, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -437,7 +437,7 @@ static int php_zip_parse_options(HashTable *options, zip_options *opts)
|
|||
if ((option = zend_hash_str_find(options, "flags", sizeof("flags") - 1)) != NULL) {
|
||||
if (Z_TYPE_P(option) != IS_LONG) {
|
||||
zend_type_error("Option \"flags\" must be of type int, %s given",
|
||||
zend_zval_type_name(option));
|
||||
zend_zval_value_name(option));
|
||||
return -1;
|
||||
}
|
||||
opts->flags = Z_LVAL_P(option);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue