php-src/ext/openssl/tests/openssl_x509_free_basic.phpt
Gabriel Caruso fef879a2d6 Use bool instead of boolean while throwing a type error
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.
2018-02-04 23:09:40 +01:00

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