Page MenuHomePhabricator

[RDFIO] error when original URI is not given
Closed, InvalidPublic

Description

Author: egon.willighagen

Description:
Samuel, while trying to debug the SPARQL issue, I noticed this error:

[Tue Sep 27 10:55:20 2011] [error] [client 127.0.0.1] PHP Notice: Undefined offset: 0 in /usr/local/share/mediawiki/RDFIO/classes/RDFStore.php on line 56, referer: http://127.0.0.1/mediawiki/index.php/Special:SPARQLEndpoint

which refers to this code:

function getOrigURIForUri( $uri ) {
    $origuri = '';
    $store = $this->m_arcstore;
    $origuriuri = $this->getOrigURIURI();
    $q = "SELECT ?origuri WHERE { <$uri> <$origuriuri> ?origuri }";
    $rs = $store->query( $q );
    if ( !$store->getErrors() ) {
        $rows = $rs['result']['rows'];
        $row = $rows[0];
        $origuri = $row['origuri'];
    } else {
        die( "Error in ARC Store: " . print_r( $store->getErrors(), true ) );
    }
    return $origuri;
}

Line 56 is the "$row = $rows[0];" line.

Not all resources have original URIs.


Version: unspecified
Severity: normal

Details

Reference
bz31182

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 11:54 PM
bzimport set Reference to bz31182.

samuel.lampa wrote:

Hi Egon, Turns out I have not got notification for this bug :( ...

Most of the code was going reworked quite heavily after 2011 though, so this error might not be present anymore?

I understand that this is an issue related to the RDFIO extension. Thus re-attributing this to [other] [RDFIO]. Probably we will have a cool GSoC project connected with this extension, so this issue may be revisited if still persistent.

zahara_ego wrote:

What should the behaviour be for a resource which doesn't have an original URI?

Peachey88 subscribed.

Closing as Invalid, Extension uses a upstream tracker.

Non of the relevant people in this task have active phab accounts from the Bz migration.