CC-2620: Undefined index error on Now playting page after upgrade

- fixed
This commit is contained in:
James 2011-08-02 13:54:26 -04:00
parent 2cfe729379
commit 79ddd93ec8

View file

@ -315,13 +315,15 @@ class Application_Model_Preference
$outputArray['STATION_DESCRIPTION'] = Application_Model_Preference::GetStationDescription();
// get web server info
$url = $systemInfoArray["AIRTIME_VERSION_URL"];
$index = strpos($url,'/api/');
$url = substr($url, 0, $index);
$headerInfo = get_headers(trim($url),1);
$outputArray['WEB_SERVER'] = $headerInfo['Server'][0];
if(isset($systemInfoArray["AIRTIME_VERSION_URL"])){
$url = $systemInfoArray["AIRTIME_VERSION_URL"];
$index = strpos($url,'/api/');
$url = substr($url, 0, $index);
$headerInfo = get_headers(trim($url),1);
$outputArray['WEB_SERVER'] = $headerInfo['Server'][0];
}
$outputArray['NUM_OF_USERS'] = User::getUserCount();
$outputArray['NUM_OF_SONGS'] = StoredFile::getFileCount();
$outputArray['NUM_OF_PLAYLISTS'] = Playlist::getPlaylistCount();