Changeset 180

Show
Ignore:
Timestamp:
03/30/07 17:47:55 (2 years ago)
Author:
mrook
Message:

Add sizecheck for messages array (closes issue #81)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/classes/phing/tasks/ext/PhpLintTask.php

    r144 r180  
    100100        $message = array(); 
    101101        exec($command.$file, $message); 
    102         if(!preg_match('/^No syntax errors detected/', $message[0])) { 
    103           $this->log($message[1], Project::MSG_ERR); 
    104     $this->hasErrors = true; 
     102        if(!preg_match('/^No syntax errors detected/', $message[0])) {     
     103          if (count($messages) > 1) 
     104          { 
     105            $this->log($message[1], Project::MSG_ERR); 
     106          } 
     107          else 
     108          { 
     109            $this->log("Could not parse file", Project::MSG_ERR); 
     110          } 
     111           
     112      $this->hasErrors = true; 
    105113        } else { 
    106114          $this->log($file.': No syntax errors detected', Project::MSG_INFO);