Ticket #291 (new defect)

Opened 10 months ago

Incorrect handling of exception, if there is empty if block presents

Reported by: pvasilevich Assigned to: somebody
Priority: major Milestone: 0.9.6
Component: eAccelerator Version: 0.9.5
Keywords: exception if Cc:

Description

Please take a look at following sample code:

function ff() {
   throw new Exception("doesn't");
}

try {
   if ( false === ff() )
   { 
   }
} catch (Exception $e) {
   echo "1";
   exit;
}

Expected output: "1". But exception goes through catch block, and there is no "1" in output.

If any code will be added in empty if block, then code will work fine:

   if ( false === ff() ) 
   {
      $foo = 555;
   }