Changeset 1863

Show
Ignore:
Timestamp:
01/29/2008 09:59:11 AM (11 months ago)
Author:
Geert
Message:

Regex optimization: kill backtracking. (comparable to r1850)

Location:
trunk/system/libraries
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Image.php

    r1848 r1863  
    320320                                { 
    321321                                        // Only numbers and percent signs 
    322                                         if ( ! preg_match('/[0-9]+%$/', $value)) 
     322                                        if ( ! preg_match('/^[0-9]++%$/D', $value)) 
    323323                                                return FALSE; 
    324324                                } 
  • trunk/system/libraries/drivers/Image.php

    r1827 r1863  
    121121 
    122122        /** 
    123          * Rotate an image. Validate amounts are -180 to 180. 
     123         * Rotate an image. Valid amounts are -180 to 180. 
    124124         * 
    125125         * @param   integer   amount to rotate