Skip to content
Snippets Groups Projects
Commit b0e06886 authored by alvaro's avatar alvaro
Browse files

Merge branch 'development'

parents ec39c5fc 64555579
No related branches found
No related tags found
No related merge requests found
...@@ -33,10 +33,23 @@ class Endpoint{ ...@@ -33,10 +33,23 @@ class Endpoint{
curl_setopt($c, CURLOPT_HTTPHEADER, $context); curl_setopt($c, CURLOPT_HTTPHEADER, $context);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true); curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$aux = curl_exec($c); // execute the curl command $aux = curl_exec($c); // execute the curl command
if($conf['debug']){
if($aux == false){
trigger_error("Error executing SPARQL query: ".curl_error($c), E_USER_ERROR);
echo("Error executing SPARQL query: ".curl_error($c));
}
}
curl_close($c); curl_close($c);
$this->params['output'] = $auxoutput; $this->params['output'] = $auxoutput;
if(preg_match("/select/i", $q)){ if(preg_match("/select/i", $q)){
$r = json_decode($aux, true); $r = json_decode($aux, true);
if($conf['debug']){
if($r == false){
trigger_error("Warning: Results from a SELECT sparql query couldn't get parsed", E_USER_WARNING);
echo("Warning: Results from a SELECT sparql query couldn't get parsed");
}
}
}
return $r; return $r;
} }
if(preg_match("/describe/i", $q)){ if(preg_match("/describe/i", $q)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment