mirror of
https://github.com/php/php-src.git
synced 2026-03-27 09:42:22 +01:00
PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
20 lines
558 B
PHP
20 lines
558 B
PHP
--TEST--
|
|
Testing wrong param passing imagerectangle() of GD library
|
|
--CREDITS--
|
|
Ivan Rosolen <contato [at] ivanrosolen [dot] com>
|
|
#testfest PHPSP on 2009-06-30
|
|
--SKIPIF--
|
|
<?php
|
|
if ( ! extension_loaded('gd') ) die( 'skip GD not present; skipping test' );
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
// Create a image
|
|
$image = imagecreatetruecolor( 100, 100 );
|
|
|
|
// Draw a rectangle
|
|
imagerectangle( $image, 0, 0, 50, 'wrong param', imagecolorallocate($image, 255, 255, 255) );
|
|
?>
|
|
--EXPECTF--
|
|
Warning: imagerectangle() expects parameter 5 to be int, %s given in %s on line %d
|