mirror of
https://github.com/php/php-src.git
synced 2024-12-19 23:11:42 +08:00
1df8175b61
More type checks that are not part of zpp and should generate a TypeError in PHP 8.
23 lines
459 B
PHP
23 lines
459 B
PHP
--TEST--
|
|
Bug #68912 (Segmentation fault at openssl_spki_new)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("openssl")) die("skip");
|
|
if (!@openssl_pkey_new()) die("skip cannot create private key");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$var1=fopen(__FILE__, 'r');
|
|
$var2=2;
|
|
$var3=3;
|
|
|
|
try {
|
|
openssl_spki_new($var1, $var2, $var3);
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
openssl_spki_new(): supplied resource is not a valid OpenSSL X.509/key resource
|