mirror of
https://github.com/php/php-src.git
synced 2025-08-17 22:48:57 +02:00

PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".
This a followup to ce1d69a1f6
, which
implements the same change for integer->int.
16 lines
443 B
PHP
16 lines
443 B
PHP
--TEST--
|
|
openssl_x509_free() tests
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("openssl")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
var_dump($res = openssl_x509_read("file://" . dirname(__FILE__) . "/cert.crt"));
|
|
openssl_x509_free($res);
|
|
var_dump($res);
|
|
openssl_x509_free(false);
|
|
?>
|
|
--EXPECTF--
|
|
resource(%d) of type (OpenSSL X.509)
|
|
resource(%d) of type (Unknown)
|
|
|
|
Warning: openssl_x509_free() expects parameter 1 to be resource, bool given in %s on line %d
|