1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 18:43:37 +02:00
Files
archived-php-src/Zend/tests/bug77494.phpt
Nikita Popov 9799cf989c Reset property table for disabled classes
To avoid retaining behavior about property visibility or types.
2021-04-20 10:35:10 +02:00

24 lines
646 B
PHP

--TEST--
Bug #77494 (Disabling class causes segfault on member access)
--SKIPIF--
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
--INI--
disable_classes=CURLFile,ErrorException
--FILE--
<?php
$a = new CURLFile();
var_dump($a->name);
$b = new ErrorException();
var_dump($b->message);
?>
--EXPECTF--
Warning: CURLFile() has been disabled for security reasons in %sbug77494.php on line 2
Warning: Undefined property: CURLFile::$name in %s on line %d
NULL
Warning: ErrorException() has been disabled for security reasons in %s on line %d
Warning: Undefined property: ErrorException::$message in %s on line %d
NULL