mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use new helper function for "cannot be empty" ValueErrors
This commit is contained in:
parent
96d572a18e
commit
e7c4d54d65
40 changed files with 96 additions and 96 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue