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

Fix bug that when not specified prefixes and converting query from SELECT to...

Fix bug that when not specified prefixes and converting query from SELECT to DESCRIBE, lodspk returns a 500
parent 5261ae4c
No related branches found
No related tags found
No related merge requests found
......@@ -355,7 +355,7 @@ class Utils{
$lodspkObj = Convert::object_to_array($lodspk);
$lodspk = $lodspkObj;
}
$query = Utils::addPrefixes($query);
if($lodspk['transform_select_query']==true){
include_once($conf['home'].'lib/arc2/ARC2.php');
$parser = ARC2::getSPARQLParser();
......@@ -418,10 +418,9 @@ class Utils{
$query = preg_replace('/select\n?.*\n?where/i', 'CONSTRUCT {'.$construct.'} WHERE', $query);
}
}else {
HTTPStatus::send500("invalid query: " . $parser->getErrors());
HTTPStatus::send500("invalid query: " . var_export($parser->getErrors(), true)."\n\nQUERY:\n".$query);
}
}
$query = Utils::addPrefixes($query);
if($conf['debug']){
echo "\n-------------------------------------------------\nIn ".getcwd()."\n";
echo "$modelFile (against ".$e->getSparqlUrl().")\n-------------------------------------------------\n\n";
......
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