diff options
author | Felipe Pena <felipe@php.net> | 2009-11-01 21:26:03 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2009-11-01 21:26:03 +0000 |
commit | 480f5c4e90541e2ae63bfa2b651d30c992491fa7 (patch) | |
tree | a3d16a3b0861a1f6b5a7310ef79c678bded7497f /Zend/tests/bug49908.phpt | |
parent | 1d789babdb109a080d68940b6cc72a5e08bebe9a (diff) | |
download | php-git-480f5c4e90541e2ae63bfa2b651d30c992491fa7.tar.gz |
- Fixed bug #49908 (throwing exception in __autoload crashes when interface is not defined)
Diffstat (limited to 'Zend/tests/bug49908.phpt')
-rw-r--r-- | Zend/tests/bug49908.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/bug49908.phpt b/Zend/tests/bug49908.phpt new file mode 100644 index 0000000000..08d6383d83 --- /dev/null +++ b/Zend/tests/bug49908.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #49908 (throwing exception in __autoload crashes when interface is not defined) +--FILE-- +<?php + +function __autoload($className) { + var_dump($className); + + if ($className == 'Foo') { + class Foo implements Bar {}; + } else { + throw new Exception($className); + } +} + +new Foo; + +?> +--EXPECTF-- +%unicode|string%(3) "Foo" +%unicode|string%(3) "Bar" + +Fatal error: Uncaught exception 'Exception' with message 'Bar' in %s:%d +Stack trace: +#0 %s(7): __autoload('Bar') +#1 %s(13): __autoload('Foo') +#2 {main} + thrown in %s on line %d |