The problem is around this code, which already has a CHECKME noted:
|
$graph->parse($data, "turtle"); |
This causes updates to the profile document to fail, because it is using the <> syntax in the turtle file.
The same fix should be applied to the 'insert' and 'delete' bits just below it.