Changeset 268

Show
Ignore:
Timestamp:
11/13/07 02:32:00 (1 year ago)
Author:
Alan Knowles
Message:

fix crash condition - not sure why its happening, but this fixes it..

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/language/php/Method.d

    r173 r268  
    1515{ 
    1616    char[][char[]]  properties; 
    17     char[]          attributes
     17    char[]          attributes = ""
    1818    char[]          docComment = ""; 
    1919    PhpType         type() { return PhpType.METHOD; } 
     
    7070        } 
    7171        // get the last of the nameparts; 
    72         this.name = nameparts[nameparts.length-1]; 
    73         this.attributes = std.string.join(nameparts[0..nameparts.length-1], " "); 
    74          
     72         
     73 
     74        this.name = nameparts.length ? nameparts[nameparts.length-1] : "unknown"; // not sure why this happens  
     75        if (nameparts.length) { 
     76 
     77            this.attributes = std.string.join(nameparts[0..nameparts.length-1], " "); 
     78        }    
    7579        // now inside ( 
    7680        // eat it.