Skip to content

Commit b56e49d

Browse files
authored
Merge branch 'PHP-8.5' into fix-gh-22216-opcache-memcons-zts
2 parents deb2308 + 80d580b commit b56e49d

3 files changed

Lines changed: 36 additions & 7 deletions

File tree

NEWS

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ PHP NEWS
1111
LXB_API as __declspec(dllimport) when linked statically into PHP.
1212
(Luther Monson)
1313

14+
- Opcache:
15+
. Fixed bug GH-22216 (spurious opcache.memory_consumption warning on each new
16+
ZTS thread; the directive is also reported as 0 in worker threads).
17+
(Daisuke Komazaki)
18+
1419
- Phar:
1520
. Fixed a bypass of the magic ".phar" directory protection in
1621
Phar::addEmptyDir() for paths starting with "/.phar", while allowing
1722
non-magic directory names that merely share the ".phar" prefix. (Weilin Du)
1823

19-
- Opcache:
20-
. Fixed bug GH-22216 (spurious opcache.memory_consumption warning on each new
21-
ZTS thread; the directive is also reported as 0 in worker threads).
22-
(Daisuke Komazaki)
24+
- SOAP:
25+
. Fixed bug GH-22218 (SoapServer::handle() crash on $_SERVER not being
26+
an array). (David Carlier / Rex-Reynolds)
2327

2428
- Zlib:
2529
. Fixed memory leak if deflate initialization fails and there is a dict.

ext/soap/soap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,10 +1393,10 @@ PHP_METHOD(SoapServer, handle)
13931393
return;
13941394
}
13951395
}
1396-
}
13971396

1398-
if ((soap_action_z = zend_hash_str_find(Z_ARRVAL_P(server_vars), ZEND_STRL("HTTP_SOAPACTION"))) != NULL && Z_TYPE_P(soap_action_z) == IS_STRING) {
1399-
soap_action = Z_STRVAL_P(soap_action_z);
1397+
if ((soap_action_z = zend_hash_str_find(Z_ARRVAL_P(server_vars), ZEND_STRL("HTTP_SOAPACTION"))) != NULL && Z_TYPE_P(soap_action_z) == IS_STRING) {
1398+
soap_action = Z_STRVAL_P(soap_action_z);
1399+
}
14001400
}
14011401

14021402
doc_request = soap_xmlParseFile("php://input");

ext/soap/tests/gh22218.phpt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
GH-22218 (SoapServer::handle() segfault on non-array/unset $_SERVER)
3+
--EXTENSIONS--
4+
soap
5+
--CREDITS--
6+
Rex-Reynolds
7+
--SKIPIF--
8+
<?php
9+
if (php_sapi_name() == 'cli') echo 'skip needs request body (POST)';
10+
?>
11+
--POST--
12+
<SOAP-ENV:Envelope
13+
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
14+
<SOAP-ENV:Body>
15+
<test/>
16+
</SOAP-ENV:Body>
17+
</SOAP-ENV:Envelope>
18+
--FILE--
19+
<?php
20+
$_SERVER = 79;
21+
$server = new SoapServer(null, ['uri' => 'http://test-uri']);
22+
$server->handle();
23+
?>
24+
--EXPECTF--
25+
%AFunction 'test' doesn't exist%A

0 commit comments

Comments
 (0)