Index: trunk/extensions/SemanticMediaWiki/includes/sparql/SMW_SparqlDatabase.php |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | * @return SMWSparqlResultWrapper |
326 | 326 | */ |
327 | 327 | public function doQuery( $sparql ) { |
328 | | - debug_zval_dump( $sparql ); |
| 328 | + //debug_zval_dump( $sparql ); |
329 | 329 | curl_setopt( $this->m_curlhandle, CURLOPT_URL, $this->m_queryEndpoint ); |
330 | 330 | curl_setopt( $this->m_curlhandle, CURLOPT_POST, true ); |
331 | 331 | $parameterString = "query=" . urlencode( $sparql ); |
— | — | @@ -459,6 +459,8 @@ |
460 | 460 | } |
461 | 461 | } elseif ( $error == CURLE_COULDNT_CONNECT ) { |
462 | 462 | return; // fail gracefully if backend is down |
| 463 | + } elseif ( $error == 52 ) { // 52 == CURLE_GOT_NOTHING, but this constant is not defined in PHP, it seems |
| 464 | + return; // happens when 4Store crashes, do not bother the wiki |
463 | 465 | } else { |
464 | 466 | throw new Exception( "Failed to communicate with SPARQL store.\n Endpoint: " . $endpoint . "\n Curl error: '" . curl_error( $this->m_curlhandle ) . "' ($error)" ); |
465 | 467 | } |