Changeset 15960

Show
Ignore:
Timestamp:
04/05/08 19:20:35 (6 months ago)
Author:
flack
Message:

show error line number when php type validation fails

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.helper.datamanager2/locale/default.de.txt

    r15646 r15960  
    8989---STRINGEND 
    9090 
     91---STRING type php: parse error in line %s 
     92Parse Error in Zeile %s 
     93---STRINGEND 
     94 
    9195---STRING type number: value must not be larger then %s 
    9296Der Wert dieses Feldes darf nicht größer als %s sein. 
  • trunk/midcom/midcom.helper.datamanager2/locale/default.en.txt

    r15646 r15960  
    117117---STRINGEND 
    118118 
     119---STRING type php: parse error in line %s 
     120Parse Error in line %s 
     121---STRINGEND 
     122 
    119123---STRING type number: value must not be larger then %s 
    120124The value of this field may not be larger then %s. 
  • trunk/midcom/midcom.helper.datamanager2/type/php.php

    r15380 r15960  
    121121        if (strstr($parse_results, 'Parse error')) 
    122122        { 
    123             $this->validation_error = $this->_l10n->get('type php: parse error'); 
     123            $line = preg_replace('/\n.+?on line (\d+?)\n.*\n/', '\1', $parse_results); 
     124            $this->validation_error = sprintf($this->_l10n->get('type php: parse error in line %s'), $line); 
     125       
    124126            debug_pop(); 
    125127            return false;