diff --git a/hphp/runtime/vm/bytecode.cpp b/hphp/runtime/vm/bytecode.cpp index 42d6de2bc..ab283e8a9 100644 --- a/hphp/runtime/vm/bytecode.cpp +++ b/hphp/runtime/vm/bytecode.cpp @@ -982,8 +982,7 @@ UnwindStatus Stack::unwindFrag(ActRec* fp, int offset, // count starts over for the caller frame. fault.m_handledCount = 0; - if (fp->isFromFPushCtor()) { - assert(fp->hasThis()); + if (fp->isFromFPushCtor() && fp->hasThis()) { fp->getThis()->setNoDestruct(); } diff --git a/hphp/test/quick/constructor_throw.php b/hphp/test/quick/constructor_throw.php new file mode 100644 index 000000000..2dca1f908 --- /dev/null +++ b/hphp/test/quick/constructor_throw.php @@ -0,0 +1,21 @@ +