(Nikita)
. Fixed bug #73108 (Internal class cast handler uses integer instead of
float). (Nikita)
+ . Fixed bug #75765 (Fatal error instead of Error exception when base class is
+ not found). (Timur Ibragimov)
- BCMath:
. Fixed bug #66364 (BCMath bcmul ignores scale parameter). (cmb)
"Cannot use '%s' as class name as it is reserved", ZSTR_VAL(extends_name));
}
- zend_compile_class_ref(&extends_node, extends_ast, 0);
+ zend_compile_class_ref(&extends_node, extends_ast, 1);
ce->ce_flags |= ZEND_ACC_INHERITED;
}
?>
--EXPECTF--
-Fatal error: Class 'NotExists' not found in %sbug73423.php(%d) : eval()'d code on line 1
+Fatal error: Uncaught Error: Class 'NotExists' not found in %sbug73423.php(%d) : eval()'d code:1
+Stack trace:
+#0 %sbug73423.php(%d): eval()
+#1 %sbug73423.php(%d): fooIterator->__destruct()
+#2 {main}
+
+Next Error: Class 'NotExists' not found in %sbug73423.php(%d) : eval()'d code:1
+Stack trace:
+#0 %sbug73423.php(%d): eval()
+#1 %sbug73423.php(%d): fooIterator->__destruct()
+#2 {main}
+ thrown in %sbug73423.php(%d) : eval()'d code on line 1
--EXPECTF--
In autoload: string(9) "UndefBase"
-Fatal error: Class 'UndefBase' not found in %s on line %d
+Fatal error: Uncaught Error: Class 'UndefBase' not found in %s:%d
+Stack trace:
+#0 {main}
+ thrown in %sautoload_011.php on line %d
--- /dev/null
+--TEST--
+Ensure that extending of undefined class throws the exception
+--FILE--
+<?php
+
+try {
+ class A extends B {}
+} catch (Error $e) {
+ var_dump(class_exists('A'));
+ var_dump(class_exists('B'));
+ throw $e;
+}
+
+?>
+--EXPECTF--
+bool(false)
+bool(false)
+
+Fatal error: Uncaught Error: Class 'B' not found in %sbug75765.php:%d
+Stack trace:
+#0 {main}
+ thrown in %sbug75765.php on line %d