mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00

Also change $max_length to $length in a number of filesystem APIs, where our usage was inconsistent. Closes GH-6276.
17 lines
462 B
PHP
17 lines
462 B
PHP
--TEST--
|
|
file_get_contents() test using negative parameter for length (last parameter)
|
|
--CREDITS--
|
|
"Blanche V.N." <valerie_nare@yahoo.fr>
|
|
"Sylvain R." <sracine@phpquebec.org>
|
|
--INI--
|
|
display_errors=false
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
file_get_contents("http://checkip.dyndns.com",null,null,0,-1);
|
|
} catch (ValueError $exception) {
|
|
echo $exception->getMessage() . "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
file_get_contents(): Argument #5 ($length) must be greater than or equal to 0
|