- call_user_function(EG(function_table), NULL, func, &retval, 2, params_pass TSRMLS_CC);
+#ifdef ZEND_ENGINE_2
+ /* ensure we can call private HttpRequest::debugWrapper() */
+ {
+ void *sc = EG(scope);
+ EG(scope) = http_request_object_ce;
+#endif
+ call_user_function(EG(function_table), NULL, func, &retval, 2, params_pass TSRMLS_CC);
+#ifdef ZEND_ENGINE_2
+ EG(scope) = sc;
+ }
+#endif