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.
27 lines
662 B
PHP
27 lines
662 B
PHP
--TEST--
|
|
imap_expunge() incorrect parameter count
|
|
--CREDITS--
|
|
Paul Sohier
|
|
#phptestfest utrecht
|
|
--SKIPIF--
|
|
<?php
|
|
require_once(dirname(__FILE__).'/skipif.inc');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
echo "Checking with no parameters\n";
|
|
imap_expunge();
|
|
|
|
echo "Checking with incorrect parameter type\n";
|
|
imap_expunge('');
|
|
imap_expunge(false);
|
|
?>
|
|
--EXPECTF--
|
|
Checking with no parameters
|
|
|
|
Warning: imap_expunge() expects exactly 1 parameter, 0 given in %s on line %d
|
|
Checking with incorrect parameter type
|
|
|
|
Warning: imap_expunge() expects parameter 1 to be resource, string given in %s on line %d
|
|
|
|
Warning: imap_expunge() expects parameter 1 to be resource, bool given in %s on line %d
|