summaryrefslogtreecommitdiff
path: root/Zend/tests/bug26697.phpt
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2003-12-23 10:45:10 +0000
committerMarcus Boerger <helly@php.net>2003-12-23 10:45:10 +0000
commitc6cb00fe592c54e328365b2aed865beecf5d0e0e (patch)
tree74ca48ee1a2983b2878f4f23aac397bd265c38d7 /Zend/tests/bug26697.phpt
parentcf45beedb5c18512151ee33fe7b552e34ca2282d (diff)
downloadphp-git-c6cb00fe592c54e328365b2aed865beecf5d0e0e.tar.gz
Fixed bug #26697 (calling class_exists on a nonexistent class in __autoload
results in segfault).
Diffstat (limited to 'Zend/tests/bug26697.phpt')
-rwxr-xr-xZend/tests/bug26697.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/bug26697.phpt b/Zend/tests/bug26697.phpt
new file mode 100755
index 0000000000..8266a23e34
--- /dev/null
+++ b/Zend/tests/bug26697.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Bug #26697 (calling class_exists on a nonexistent class in __autoload results in segfault)
+--SKIPIF--
+<?php if (function_exists('__autoload')) die('skip __autoload() declared in auto_prepend_file');?>
+--FILE--
+<?php
+
+function __autoload($name)
+{
+ echo __METHOD__ . "($name)\n";
+ var_dump(class_exists('NotExistingClass'));
+ echo __METHOD__ . "($name), done\n";
+}
+
+var_dump(class_exists('NotExistingClass'));
+
+?>
+===DONE===
+--EXPECTF--
+__autoload(NotExistingClass)
+bool(false)
+__autoload(NotExistingClass), done
+bool(false)
+===DONE===