# HG changeset patch # User Dan # Date 1241492793 14400 # Node ID 745cccc6b97d8463715da929c7f4c2d8556f7fa2 # Parent 36289dcb5c8aad4f7d695f90decab4f16e529d0d Admin: Home: Properly handles Request_HTTP exceptions now diff -r 36289dcb5c8a -r 745cccc6b97d plugins/admin/Home.php --- a/plugins/admin/Home.php Mon May 04 23:05:52 2009 -0400 +++ b/plugins/admin/Home.php Mon May 04 23:06:33 2009 -0400 @@ -156,15 +156,26 @@ { require_once(ENANO_ROOT . '/includes/http.php'); - $req = new Request_HTTP('ktulu.enanocms.org', '/meta/updates.xml'); - $response = $req->get_response_body(); - header('Content-type: application/xml'); + try + { + $req = new Request_HTTP('ktulu.enanocms.org', '/meta/updates.xml'); + $response = $req->get_response_body(); + header('Content-type: application/xml'); + } + catch ( Exception $e ) + { + header('Content-type: application/xml'); + echo 'getMessage() . ' +]]>'; + return true; + } if ( $req->response_code != HTTP_OK ) { // Error in response - echo 'response_code . ' ' . $req->response_string . ' -]]>'; +]]>'; } else { @@ -172,9 +183,9 @@ $first_update = preg_match('//', $response, $match); if ( !$first_update ) { - echo ''; +]]>'; } else {