Description
The following code:
<?php
new \SoapHeader("ns", "name", [], false, "AB");
Resulted in this output:
Fatal error: Uncaught ValueError: SoapHeader::__construct(): Argument #2 ($name) must be longer than 2 characters in /home/user/scripts/code.php:4
But I expected this output instead:
Fatal error: Uncaught ValueError: SoapHeader::__construct(): Argument #5 ($actor) must be longer than 2 characters in /home/user/scripts/code.php:4
2803c8f added a check in file ext/soap/soap.c on the SoapHeader constructor which checks that the length of actor is greater than 2 when it is a string. However, the error is thrown on parameter 2 ($name) instead of being thrown on parameter 5 ($actor):
|
zend_argument_value_error(2, "must be longer than 2 characters"); |
Besides the error being thrown on the wrong parameter number, is there a specific reason of adding a minimum length of 2 on the actor string?
PHP Version
PHP 8.0
Operating System
No response
Description
The following code:
Resulted in this output:
But I expected this output instead:
2803c8f added a check in file
ext/soap/soap.con the SoapHeader constructor which checks that the length of actor is greater than 2 when it is a string. However, the error is thrown on parameter 2 ($name) instead of being thrown on parameter 5 ($actor):php-src/ext/soap/soap.c
Line 604 in 2826550
Besides the error being thrown on the wrong parameter number, is there a specific reason of adding a minimum length of 2 on the actor string?
PHP Version
PHP 8.0
Operating System
No response