Permalink
Browse files

fixed bug where description mapping did not correctly handle untyped …

…literals (treated them as resources!)
  • Loading branch information...
1 parent 0be554f commit 1b1fe568b8493ab0172530deab1f9bf00b500cc2 Christopher Gutteridge committed May 3, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 Graphite/Description.php
View
@@ -115,11 +115,13 @@ function _tograph( $tree, $resource, &$new_graph )
{
if( is_a( $value, "Graphite_Literal" ) )
{
+ $datatype = $value->datatype();
+ if( !isset($datatype) ) { $datatype='literal'; }
$new_graph->addTriple(
(string)$resource,
(string)$relation,
(string)$value,
- $value->datatype(),
+ $datatype,
$value->language() );
}
else

0 comments on commit 1b1fe56

Please sign in to comment.