mirror of
https://github.com/php/php-src.git
synced 2026-04-19 14:01:01 +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.
20 lines
584 B
PHP
20 lines
584 B
PHP
--TEST--
|
|
Bug #71527 Buffer over-write in finfo_open with malformed magic file
|
|
--SKIPIF--
|
|
<?php
|
|
if (!class_exists('finfo'))
|
|
die('skip no fileinfo extension');
|
|
--ENV--
|
|
USE_ZEND_ALLOC=0
|
|
--FILE--
|
|
<?php
|
|
$finfo = finfo_open(FILEINFO_NONE, dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71527.magic");
|
|
$info = finfo_file($finfo, __FILE__);
|
|
var_dump($info);
|
|
?>
|
|
--EXPECTF--
|
|
Warning: finfo_open(): Failed to load magic database at '%sbug71527.magic'. in %sbug71527.php on line %d
|
|
|
|
Warning: finfo_file() expects parameter 1 to be resource, bool given in %sbug71527.php on line %d
|
|
bool(false)
|