- Fixed bug #51062 (DBA DB4 uses mismatched headers and libraries). (Chris Jones)
- Fixed bug #51023 (filter doesn't detect int overflows with GCC 4.4).
(Raphael Geissert)
+- Fixed bug #50383 (Exceptions thrown in __call / __callStatic do not include
+ file and line in trace). (Felipe)
- Fixed bug #49267 (Linking fails for iconv). (Moriyosh)
- Fixed bug #43314 (iconv_mime_encode(), broken Q scheme). (Rasmus)
- Fixed bug #23229 (syslog function truncates messages). (Adam)
--- /dev/null
+--TEST--
+Bug #50383 (Exceptions thrown in __call / __callStatic do not include file and line in trace)
+--FILE--
+<?php
+
+class myClass {
+ public function __call($method, $args) {
+ throw new Exception("Missing method '$method'\n");
+ }
+}
+
+function thrower2() {
+ $x = new myClass;
+ $x->foo();
+}
+
+try {
+ thrower2();
+} catch (Exception $e) {
+ print $e->getMessage();
+ print_r($e->getTrace());
+}
+
+?>
+--EXPECTF--
+Missing method 'foo'
+Array
+(
+ [0] => Array
+ (
+ [file] => %s
+ [line] => 11
+ [function] => __call
+ [class] => myClass
+ [type] => ->
+ [args] => Array
+ (
+ [0] => foo
+ [1] => Array
+ (
+ )
+
+ )
+
+ )
+
+ [1] => Array
+ (
+ [file] => %s
+ [line] => 11
+ [function] => foo
+ [class] => myClass
+ [type] => ->
+ [args] => Array
+ (
+ )
+
+ )
+
+ [2] => Array
+ (
+ [file] => %s
+ [line] => 15
+ [function] => thrower2
+ [args] => Array
+ (
+ )
+
+ )
+
+)
while (prev) {
if (prev->function_state.function &&
- prev->function_state.function->common.type != ZEND_USER_FUNCTION) {
+ prev->function_state.function->common.type != ZEND_USER_FUNCTION &&
+ !(prev->function_state.function->common.type == ZEND_INTERNAL_FUNCTION &&
+ (prev->function_state.function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER))) {
break;
}
if (prev->op_array) {