Ignore:
Timestamp:
2011-04-10T09:58:58+02:00 (4 years ago)
Author:
moo
Message:

PHP_6: disassembler/decompiler: fix property

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Decompiler.class.php

    r727 r730  
    16701670        // }}} 
    16711671        // {{{ properties 
    1672         if (!empty($class['default_properties']) || !empty($class['default_static_members'])) { 
     1672        $member_variables = isset($class['properties_info']) ? $class['properties_info'] : ($class['default_static_members'] + $class['default_properties']); 
     1673        if ($member_variables) { 
    16731674            echo "\n"; 
    16741675            $infos = !empty($class['properties_info']) ? $class['properties_info'] : null; 
    1675             foreach (!empty($class['properties_info']) ? $class['properties_info'] : ($class['default_static_members'] + $class['default_properties']) as $name => $dummy) { 
     1676            foreach ($member_variables as $name => $dummy) { 
    16761677                $info = (isset($infos) && isset($infos[$name])) ? $infos[$name] : null; 
    16771678                if (isset($info)) { 
     
    17261727                echo '$', $name; 
    17271728 
    1728                 $key = isset($info) ? $info['name'] . ($mangled ? "\000" : "") : $name; 
    1729  
    1730                 $value = $class[$static ? 'default_static_members' : 'default_properties'][$key]; 
     1729                if (isset($info['offset'])) { 
     1730                    $value = $class[$static ? 'default_static_members_table' : 'default_properties_table'][$info['offset']]; 
     1731                } 
     1732                else { 
     1733                    $key = isset($info) ? $info['name'] . ($mangled ? "\000" : "") : $name; 
     1734 
     1735                    $value = $class[$static ? 'default_static_members' : 'default_properties'][$key]; 
     1736                } 
    17311737                if (isset($value)) { 
    17321738                    echo ' = '; 
Note: See TracChangeset for help on using the changeset viewer.