Use new helper function for "cannot be empty" ValueErrors

This commit is contained in:
Gina Peter Bnayard 2024-08-18 20:09:08 +02:00 committed by Gina Peter Banyard
parent 96d572a18e
commit e7c4d54d65
40 changed files with 96 additions and 96 deletions

View file

@ -382,7 +382,7 @@ static void php_xmlreader_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlreader_rea
}
if (!name_len) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}
@ -467,7 +467,7 @@ static void php_xmlreader_set_relaxng_schema(INTERNAL_FUNCTION_PARAMETERS, int t
}
if (source != NULL && !source_len) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}
@ -574,12 +574,12 @@ PHP_METHOD(XMLReader, getAttributeNs)
}
if (name_len == 0) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}
if (ns_uri_len == 0) {
zend_argument_value_error(2, "cannot be empty");
zend_argument_cannot_be_empty_error(2);
RETURN_THROWS();
}
@ -655,7 +655,7 @@ PHP_METHOD(XMLReader, moveToAttribute)
}
if (name_len == 0) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}
@ -715,12 +715,12 @@ PHP_METHOD(XMLReader, moveToAttributeNs)
}
if (name_len == 0) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}
if (ns_uri_len == 0) {
zend_argument_value_error(2, "cannot be empty");
zend_argument_cannot_be_empty_error(2);
RETURN_THROWS();
}
@ -860,7 +860,7 @@ static void xml_reader_from_uri(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *
}
if (!source_len) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}
@ -1027,7 +1027,7 @@ PHP_METHOD(XMLReader, setSchema)
}
if (source != NULL && !source_len) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}
@ -1132,7 +1132,7 @@ static void xml_reader_from_string(INTERNAL_FUNCTION_PARAMETERS, zend_class_entr
}
if (!source_len) {
zend_argument_value_error(1, "cannot be empty");
zend_argument_cannot_be_empty_error(1);
RETURN_THROWS();
}