diff --git a/ext/uri/php_uri.stub.php b/ext/uri/php_uri.stub.php index b0b83fcf83ec..447d3a3321da 100644 --- a/ext/uri/php_uri.stub.php +++ b/ext/uri/php_uri.stub.php @@ -153,7 +153,7 @@ enum UrlValidationErrorType case InvalidUrlUnit; case SpecialSchemeMissingFollowingSolidus; case MissingSchemeNonRelativeUrl; - case InvalidReverseSoldius; + case InvalidReverseSolidus; case InvalidCredentials; case HostMissing; case PortOutOfRange; diff --git a/ext/uri/php_uri_arginfo.h b/ext/uri/php_uri_arginfo.h index 0fb464ee74aa..d1bff8f2dbbc 100644 --- a/ext/uri/php_uri_arginfo.h +++ b/ext/uri/php_uri_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit php_uri.stub.php instead. - * Stub hash: a3b4696ac001d537cc34b818715c7eb382c17c5b + * Stub hash: 8bf205edfa9cb281e73daf66285aa6a60f3431c0 * Has decl header: yes */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Uri_Rfc3986_Uri_parse, 0, 1, IS_STATIC, 1) @@ -480,7 +480,7 @@ static zend_class_entry *register_class_Uri_WhatWg_UrlValidationErrorType(void) zend_enum_add_case_cstr(class_entry, "MissingSchemeNonRelativeUrl", NULL); - zend_enum_add_case_cstr(class_entry, "InvalidReverseSoldius", NULL); + zend_enum_add_case_cstr(class_entry, "InvalidReverseSolidus", NULL); zend_enum_add_case_cstr(class_entry, "InvalidCredentials", NULL); diff --git a/ext/uri/php_uri_decl.h b/ext/uri/php_uri_decl.h index d1fd58d04b2c..8b8a980846db 100644 --- a/ext/uri/php_uri_decl.h +++ b/ext/uri/php_uri_decl.h @@ -1,8 +1,8 @@ /* This is a generated file, edit php_uri.stub.php instead. - * Stub hash: a3b4696ac001d537cc34b818715c7eb382c17c5b */ + * Stub hash: 8bf205edfa9cb281e73daf66285aa6a60f3431c0 */ -#ifndef ZEND_PHP_URI_DECL_a3b4696ac001d537cc34b818715c7eb382c17c5b_H -#define ZEND_PHP_URI_DECL_a3b4696ac001d537cc34b818715c7eb382c17c5b_H +#ifndef ZEND_PHP_URI_DECL_8bf205edfa9cb281e73daf66285aa6a60f3431c0_H +#define ZEND_PHP_URI_DECL_8bf205edfa9cb281e73daf66285aa6a60f3431c0_H typedef enum zend_enum_Uri_UriComparisonMode { ZEND_ENUM_Uri_UriComparisonMode_IncludeFragment = 1, @@ -46,7 +46,7 @@ typedef enum zend_enum_Uri_WhatWg_UrlValidationErrorType { ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_InvalidUrlUnit = 20, ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_SpecialSchemeMissingFollowingSolidus = 21, ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_MissingSchemeNonRelativeUrl = 22, - ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_InvalidReverseSoldius = 23, + ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_InvalidReverseSolidus = 23, ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_InvalidCredentials = 24, ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_HostMissing = 25, ZEND_ENUM_Uri_WhatWg_UrlValidationErrorType_PortOutOfRange = 26, @@ -63,4 +63,4 @@ typedef enum zend_enum_Uri_WhatWg_UrlHostType { ZEND_ENUM_Uri_WhatWg_UrlHostType_Empty = 5, } zend_enum_Uri_WhatWg_UrlHostType; -#endif /* ZEND_PHP_URI_DECL_a3b4696ac001d537cc34b818715c7eb382c17c5b_H */ +#endif /* ZEND_PHP_URI_DECL_8bf205edfa9cb281e73daf66285aa6a60f3431c0_H */ diff --git a/ext/uri/tests/invalid_reverse_solidus_enum.phpt b/ext/uri/tests/invalid_reverse_solidus_enum.phpt new file mode 100644 index 000000000000..753841b15736 --- /dev/null +++ b/ext/uri/tests/invalid_reverse_solidus_enum.phpt @@ -0,0 +1,17 @@ +--TEST-- +Uri\WhatWg\UrlValidationErrorType uses the correct InvalidReverseSolidus spelling +--EXTENSIONS-- +uri +--FILE-- + $case->name, + Uri\WhatWg\UrlValidationErrorType::cases(), +); + +var_dump(in_array('InvalidReverseSolidus', $caseNames, true)); +var_dump(in_array('InvalidReverseSoldius', $caseNames, true)); +?> +--EXPECT-- +bool(true) +bool(false) diff --git a/ext/uri/uri_parser_whatwg.c b/ext/uri/uri_parser_whatwg.c index f4e148704004..241c9f2d2513 100644 --- a/ext/uri/uri_parser_whatwg.c +++ b/ext/uri/uri_parser_whatwg.c @@ -167,7 +167,7 @@ static const char *fill_errors(zval *errors) ZVAL_TRUE(&failure); break; case LXB_URL_ERROR_TYPE_INVALID_REVERSE_SOLIDUS: - error_str = "InvalidReverseSoldius"; + error_str = "InvalidReverseSolidus"; ZVAL_FALSE(&failure); break; case LXB_URL_ERROR_TYPE_INVALID_CREDENTIALS: