njh/easyrdf — Issue #50: CONSTRUCT query fails if SPARQL server replies with charset
Author: osma
Created: 2011-10-17 09:59:35+00:00
State: open

I'm using EasyRdf_Sparql_Client with a Joseki/ARQ based SPARQL server.

Performing SELECT queries works well (after I switched to the head version -- EasyRdf 0.6.2 didn't work because of issue #48), but when I switched my query to a CONSTRUCT I got the following error:

PHP Fatal error: Uncaught exception 'EasyRdf_Exception' with message 'Format is not recognised: text/plain; charset=utf-8' in [blahblah]/njh-easyrdf-8337319/lib/EasyRdf/Format.php:148

I made a quick and dirty fix by adding these lines to getFormat() in Format.php:

$query = explode(';', $query);
$query = $query[0];

but I think a more proper fix would be needed.