techfromsage / tripod-php

Object Graph Mapper for managing RDF data in Mongo
MIT License
29 stars 4 forks source link

Reference fix for PHP 7.0 #120

Closed rgubby closed 7 years ago

rgubby commented 7 years ago

To avoid PHP warnings we need to convert this line:

$this->_add_arc2_triple_list($parser->getTriples());

into:

$triples = $parser->getTriples();
$this->_add_arc2_triple_list($triples);

This was done originally in the add_turtle method, but not others.

Other changes here are to do with test config for mongo connection strings. Without a hostname delimiter (the slash), you get this error when running the build under PHP 7.0:

MongoDB\Driver\Exception\InvalidArgumentException: Failed to parse MongoDB URI: 'mongodb://localhost?connectTimeoutMS=20000'. Expected end of hostname delimiter.

This fixes that up.