Changeset 1017

Show
Ignore:
Timestamp:
03/20/2008 05:47:00 PM (16 months ago)
Author:
BrianKoontz
Message:

Tested all error branches; minor fix to PHP_OS check. Refs
#381, #562

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1.6.4/actions/checkversion.php

    r1015 r1017  
    4646         
    4747        // Attempt to get latest_wikka_version.txt 
    48         // The action won't work on Windows PHP 4.3.0 or less 
     48        // The action won't work on Windows PHP <4.3.0 
    4949        $timeout = CHECKVERSION_CONNECTION_TIMEOUT; 
    50         if (TRUE === strpos(strtolower(PHP_OS), 'windows')) 
     50        if (FALSE !== strpos(strtolower(PHP_OS), 'windows') && 
     51        TRUE === version_compare(PHP_VERSION, '4.3.0', '<')) 
    5152        { 
    5253                if ($vars['display'] == "debug") 
    5354                { 
    54                         echo '<span class="debug">[Windows PHP does not support this feature]</span>'."\n"; 
    55                 } 
    56                 return; 
    57         } 
    58         else if (FALSE === version_compare(PHP_VERSION, '4.3.0', '>=')) 
    59         { 
    60                 if ($vars['display'] == "debug") 
    61                 { 
    62                         echo '<span class="debug">[PHP < 4.3.0 does not support this feature]</span>'."\n"; 
     55                        echo '<span class="debug">['.PHP_OS.' PHP '.PHP_VERSION.' does not support this feature]</span>'."\n"; 
    6356                } 
    6457                return; 
     
    7265                                echo '<span class="debug">[allow_url_fopen disabled]</span>'."\n"; 
    7366                        } 
     67                        return; 
    7468                } 
    7569                else 
     
    9387                                        echo '<span class="debug">[Cannot initiate socket connection]</span>'."\n"; 
    9488                                } 
    95                                 // Return gracefully on error 
    9689                                return; 
    9790                        }