php-src/ext/gd/tests/gdimage_prevent_cloning.phpt
Christoph M. Becker a375d54785
Migrate skip checks to --EXTENSIONS-- for ext/gd
Cf. PR #6787.

Closes GH-6994.
2021-05-22 15:38:51 +02:00

17 lines
324 B
PHP

--TEST--
Checks that GdImage instances cannot be cloned
--EXTENSIONS--
gd
--FILE--
<?php
$img_src = imagecreatetruecolor(32, 32);
$img_dst = clone $img_src;
?>
--EXPECTF--
Fatal error: Uncaught Error: Trying to clone an uncloneable object of class GdImage in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d