Closed oetterer closed 7 years ago
Neither \SMW\Store::getQueryResult nor \SMW\Scribunto\LibraryFactory::newQueryResultFrom documents this possible behavior correctly
I know it's a bit unfair but [0] does mention @return QueryResult|string
.
[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/QueryEngine.php
@mwjames touché :)
Setup and configuration
Issue
Since
\SMW\Scribunto\LibraryFactory::newQueryResultFrom
does not return an object of class\SMWQueryResult
onformat=debug
, functionask
fails in\SMW\Scribunto\LuaAskResultProcessor::__construct
Stacktrace is:
and
getQueryResult
fails in\SMW\Scribunto\ScribuntoLuaLibrary::getQueryResult
on operationwith
Reproduction
Steps to reproduce the observation (recommendation is to use the sandbox):
I added the tests
note
\SMW\Store::getQueryResult
nor\SMW\Scribunto\LibraryFactory::newQueryResultFrom
documents this possible behavior correctly. :(ask
produces a null result whereasgetQueryResult
returns a correct table.