Ignore:
Timestamp:
2013-07-14T21:01:49+02:00 (23 months ago)
Author:
moo
Message:

Decompiler: fix handling catch with/without FETCH_CLASS & JMP for different PHP version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Decompiler.class.php

    r1308 r1309  
    990990                if ($opcodes[$i]['opcode'] == XC_CATCH) {
    991991                    $catchOpLine = $i;
    992                     $this->removeJmpInfo($EX, $catchOpLine - 1);
     992                    $this->removeJmpInfo($EX, $catchFirst);
    993993
    994994                    $catchNext = $opcodes[$catchOpLine]['extended_value'];
     
    13601360            case XC_CATCH:
    13611361                $catchNext = $op['extended_value'];
    1362                 assert($opcodes[$i - 1]['opcode'] == XC_FETCH_CLASS);
    1363                 $opcodes[$i - 1]['jmpouts'] = array($catchNext);
    1364                 $opcodes[$catchNext]['jmpins'][] = $i - 1;
     1362                $catchBegin = $opcodes[$i - 1]['opcode'] == XC_FETCH_CLASS ? $i - 1 : $i;
     1363                $opcodes[$catchBegin]['jmpouts'] = array($catchNext);
     1364                $opcodes[$catchNext]['jmpins'][] = $catchBegin;
    13651365                break;
    13661366            }
Note: See TracChangeset for help on using the changeset viewer.