php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80884 SoapVar optional parameter types depend on PHP version
Submitted: 2021-03-18 18:24 UTC Modified: 2021-08-03 13:07 UTC
From: php at hatlak dot de Assigned: cmb (profile)
Status: Closed Package: SOAP related
PHP Version: 8.0.3 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at hatlak dot de
New email:
PHP Version: OS:

 

 [2021-03-18 18:24 UTC] php at hatlak dot de
Description:
------------
---
From manual page: https://php.net/soapvar.construct
and https://php.net/class.soapvar
---

Both the SoapVar main page and constructor documentation state that the optional parameters only accept string (and have an empty string as default value).

This changed with PHP 8:
https://github.com/php/php-src/commit/32d128d219f2d2d0767103091b4209a28f48b4ac
https://github.com/php/php-src/blob/master/ext/soap/soap.stub.php#L28

They are now all nullable and have NULL as default value.

The documentation needs to be updated in such a way that both variants are covered. It's important because e.g. PHP 7.4 won't accept NULL (TypeError) while PHP 8 will.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-18 23:23 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: SOAP related
 [2021-03-18 23:23 UTC] cmb@php.net
Ah, right, good catch!  Note that this changed only as of PHP
8.0.3.
 [2021-08-03 13:07 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 13 12:01:27 2024 UTC