get static locals from the first local AFTER the params

I directly copied continuations for this, but they never have params. Closures sometimes have params, and the closure itself will be the first local AFTER those.
Esse commit está contido em:
ptarjan
2013-03-22 15:29:15 -07:00
commit de Sara Golemon
commit 5ce11ce940
+1 -1
Ver Arquivo
@@ -384,7 +384,7 @@ bool run_intercept_handler_for_invokefunc(TypedValue* retval,
HphpArray* get_static_locals(const ActRec* ar) {
if (ar->m_func->isClosureBody()) {
TypedValue* closureLoc = frame_local(ar, 0);
TypedValue* closureLoc = frame_local(ar, ar->m_func->numParams());
c_Closure* closure = static_cast<c_Closure*>(closureLoc->m_data.pobj);
assert(closure != nullptr);
return closure->getStaticLocals();