mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
While the `path` is not supposed to be `NULL` for normal operation, it is possible to create `SplFileInfo` objects where that is the case, and we must not follow the null pointer. Closes GH-7814.
13 lines
243 B
PHP
13 lines
243 B
PHP
--TEST--
|
|
Bug GH-7809 (Cloning a faked SplFileInfo object may segfault)
|
|
--FILE--
|
|
<?php
|
|
class MySplFileInfo extends SplFileInfo {
|
|
public function __construct(string $filename) {}
|
|
}
|
|
|
|
$sfi = new MySplFileInfo("foo");
|
|
clone $sfi;
|
|
?>
|
|
--EXPECT--
|