Changeset 1203


Ignore:
Timestamp:
2012-12-17T14:35:48+01:00 (20 months ago)
Author:
moo
Message:

undefined variable when ini is not found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/diagnosis/index.php

    r1202 r1203  
    6565    $iniDirectory = ''; 
    6666    if (preg_match('!<td class="v">(.*?\\.ini)!', $info, $m)) { 
    67         $loadedIni = $m[1]; 
     67        $loadedIni = trim($m[1]); 
    6868    } 
    6969    else if (preg_match('!Configuration File \\(php.ini\\) Path *</td><td class="v">([^<]+)!', $info, $m)) { 
    70         $iniDirectory = $m[1]; 
     70        $iniDirectory = trim($m[1]); 
    7171    } 
    7272    return array($loadedIni, $iniDirectory, $iniInfo); 
     
    8181        echo sprintf(_T("Add extension=xcache.so (or xcache.dll) in %s"), $loadedIni); 
    8282    } 
    83     else if (preg_match('!Configuration File \\(php.ini\\) Path *</td><td class="v">([^<]+)!', $loadedIni, $m)) { 
     83    else if ($iniDirectory) { 
    8484        echo sprintf(_T("Please put a php.ini in %s and add extension=xcache.so (or xcache.dll) in it"), $iniDirectory); 
    8585    } 
Note: See TracChangeset for help on using the changeset viewer.