Skip to content

Commit e6e5260

Browse files
committed
Convert OpenSSL resources to object
1 parent 8664ff7 commit e6e5260

37 files changed

+1083
-764
lines changed

UPGRADING

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,23 @@ PHP 8.0 UPGRADE NOTES
343343
. Several alias functions have been marked as deprecated.
344344
. oci_internal_debug() and its alias ociinternaldebug() have been removed.
345345

346+
- OpenSSL:
347+
. openssl_x509_read() and openssl_csr_sign() will now return an
348+
X509Certificate object rather than a resource. Return value checks using
349+
is_resource() should be replaced with checks for `false`.
350+
. The openssl_x509_free() function is deprecated and no longer has an effect,
351+
instead the X509Certificate instance is automatically destroyed if it is no
352+
longer referenced.
353+
. openssl_csr_new() will now return an X509CertificateSigningRequest object
354+
rather than a resource. Return value checks using is_resource() should be
355+
replaced with checks for `false`.
356+
. openssl_pkey_new() will now return an OpenSSLKey object rather than a
357+
resource. Return value checks using is_resource() should be replaced with
358+
checks for `false`.
359+
. The openssl_pkey_free() function is deprecated and no longer has an effect,
360+
instead the OpenSSLKey instance is automatically destroyed if it is no
361+
longer referenced.
362+
346363
- PCRE:
347364
. When passing invalid escape sequences they are no longer interpreted as
348365
literals. This behaviour previously required the X modifier - which is

Zend/zend_API.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,8 @@ static zend_always_inline int zend_parse_arg_str_or_obj(
20152015
) {
20162016
if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
20172017
if (base_ce && UNEXPECTED(!instanceof_function(Z_OBJCE_P(arg), base_ce))) {
2018-
return 0;
2018+
*destination_object = NULL;
2019+
return zend_parse_arg_str_slow(arg, destination_string);
20192020
}
20202021

20212022
*destination_string = NULL;

0 commit comments

Comments
 (0)