intern = (spl_dual_it_object*)zend_object_store_get_object(*object_ptr TSRMLS_CC);
function_handler = std_object_handlers.get_method(object_ptr, method, method_len TSRMLS_CC);
- if (!function_handler) {
+ if (!function_handler && intern->inner.ce) {
if (zend_u_hash_find(&intern->inner.ce->function_table, IS_UNICODE, method, method_len+1, (void **) &function_handler) == FAILURE) {
if (Z_OBJ_HT_P(intern->inner.zobject)->get_method) {
*object_ptr = intern->inner.zobject;
--- /dev/null
+--TEST--
+Bug #49972 (AppendIterator undefined function crash)
+--FILE--
+<?php
+
+$iterator = new AppendIterator();
+$iterator->undefined();
+
+?>
+--EXPECTF--
+Fatal error: Call to undefined method AppendIterator::undefined() in %s on line %d