From: Roger H. <ro...@td...> - 2007-05-17 21:02:51
|
If I try and remove a quad with a literal object from a db dataset I get Call to a member function qstr() on a non-object in /Users/rogerhyam/ Sites/trap/lib/rdfapi-php/api/model/DbModel.php on line 1042 As far as I can see this is because DatasetDb.php line 358 makes the following call // dynamic part of the sql statement $sql .= DbModel::_createDynSqlPart_SPO($quad->getSubject(), $quad- >getPredicate(), $quad->getObject()); This is a static call to the private method on the DbModel. where on line 1042 $quotedLiteral = $this->dbConn->qstr($object->getLabel()); throws the wobbly because there is no dbConn. The dbConn is only initialized when a DbModel is created. The call to the static method is not safe (probably why it is private). This only breaks with literals and I suspect it has never been tested properly. There are several places where the same call is made. What is the status of this code? Am I doing something dumb? Is anyone working on it just now? Thanks for your time on this, Roger |