Skip to content

Commit 0bea07d

Browse files
committed
Change lang from ?string to string
1 parent e1ecd4c commit 0bea07d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

ext/soap/soap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ static void soap_fault_dtor_properties(zval *obj)
657657
ZVAL_NULL(Z_FAULT_DETAIL_P(obj));
658658
ZVAL_NULL(Z_FAULT_NAME_P(obj));
659659
ZVAL_NULL(Z_FAULT_HEADERFAULT_P(obj));
660-
ZVAL_NULL(Z_FAULT_LANG_P(obj));
660+
ZVAL_EMPTY_STRING(Z_FAULT_LANG_P(obj));
661661
}
662662

663663
/* {{{ SoapFault constructor */
@@ -1724,11 +1724,11 @@ PHP_METHOD(SoapServer, fault)
17241724
size_t code_len, string_len, actor_len = 0;
17251725
zval* details = NULL;
17261726
zend_string *name = NULL;
1727-
zend_string *lang = NULL;
1727+
zend_string *lang = ZSTR_EMPTY_ALLOC();
17281728
soapServicePtr service;
17291729
xmlCharEncodingHandlerPtr old_encoding;
17301730

1731-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|szSS!",
1731+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|szSS",
17321732
&code, &code_len, &string, &string_len, &actor, &actor_len, &details,
17331733
&name, &lang) == FAILURE) {
17341734
RETURN_THROWS();
@@ -3754,7 +3754,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, const char *fu
37543754

37553755
/* xml:lang attribute is required for <Reason> in SOAP 1.2 */
37563756
tmp = Z_FAULT_LANG_P(ret);
3757-
zend_string *lang = Z_ISNULL_P(tmp) ? ZSTR_EMPTY_ALLOC() : Z_STR_P(tmp);
3757+
zend_string *lang = Z_STR_P(tmp);
37583758
xmlNodeSetLang(node, BAD_CAST ZSTR_VAL(lang));
37593759
}
37603760
detail_name = SOAP_1_2_ENV_NS_PREFIX":Detail";

ext/soap/soap.stub.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ class SoapFault extends Exception
477477
public mixed $detail = null;
478478
public ?string $_name = null;
479479
public mixed $headerfault = null;
480-
public ?string $lang = null;
480+
public string $lang = "";
481481

482-
public function __construct(array|string|null $code, string $string, ?string $actor = null, mixed $details = null, ?string $name = null, mixed $headerFault = null, ?string $lang = null) {}
482+
public function __construct(array|string|null $code, string $string, ?string $actor = null, mixed $details = null, ?string $name = null, mixed $headerFault = null, string $lang = "") {}
483483

484484
public function __toString(): string {}
485485
}
@@ -503,7 +503,7 @@ class SoapServer
503503
public function __construct(?string $wsdl, array $options = []) {}
504504

505505
/** @tentative-return-type */
506-
public function fault(string $code, string $string, string $actor = "", mixed $details = null, string $name = "", ?string $lang = null): void {}
506+
public function fault(string $code, string $string, string $actor = "", mixed $details = null, string $name = "", string $lang = ""): void {}
507507

508508
/** @tentative-return-type */
509509
public function addSoapHeader(SoapHeader $header): void {}

ext/soap/soap_arginfo.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)