@@ -1497,7 +1497,7 @@ PHP_FUNCTION(openssl_x509_export_to_file)
14971497
14981498 cert = php_openssl_x509_from_param (cert_obj , cert_str );
14991499 if (cert == NULL ) {
1500- zend_argument_type_error (1 , "X.509 Certificate cannot be retrieved" );
1500+ zend_argument_value_error (1 , "X.509 Certificate cannot be retrieved" );
15011501 RETURN_THROWS ();
15021502 }
15031503
@@ -1922,8 +1922,7 @@ PHP_FUNCTION(openssl_x509_check_private_key)
19221922
19231923 cert = php_openssl_x509_from_param (cert_obj , cert_str );
19241924 if (cert == NULL ) {
1925- zend_argument_type_error (1 , "cannot be coerced into an X509 certificate" );
1926- RETURN_THROWS ();
1925+ RETURN_FALSE ;
19271926 }
19281927
19291928 RETVAL_FALSE ;
@@ -1961,8 +1960,7 @@ PHP_FUNCTION(openssl_x509_verify)
19611960
19621961 cert = php_openssl_x509_from_param (cert_obj , cert_str );
19631962 if (cert == NULL ) {
1964- zend_argument_type_error (1 , "cannot be coerced into an X509 certificate" );
1965- RETURN_THROWS ();
1963+ RETURN_LONG (err );
19661964 }
19671965
19681966 key = php_openssl_pkey_from_zval (zkey , 1 , NULL , 0 , & free_pkey );
@@ -3090,9 +3088,7 @@ PHP_FUNCTION(openssl_csr_export_to_file)
30903088
30913089 csr = php_openssl_csr_from_param (csr_obj , csr_str );
30923090 if (csr == NULL ) {
3093- if (!EG (exception )) {
3094- zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
3095- }
3091+ zend_argument_value_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
30963092 RETURN_THROWS ();
30973093 }
30983094
@@ -3208,9 +3204,7 @@ PHP_FUNCTION(openssl_csr_sign)
32083204
32093205 csr = php_openssl_csr_from_param (csr_obj , csr_str );
32103206 if (csr == NULL) {
3211- if (!EG (exception )) {
3212- zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
3213- }
3207+ zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
32143208 RETURN_THROWS ();
32153209 }
32163210
0 commit comments