When creating a SPARQL view, trying to fetch data from dbpedia, I get these warnings:

Strict warning: Declaration of sparql_views_handler_argument::query() should be compatible with that of views_handler_argument::query() in require_once() (line 9 of C:\xampp\htdocs\Drupal77\drupal-7.7\sites\all\modules\sparql_views\handlers\sparql_views_handler_argument.inc).
Strict warning: Only variables should be passed by reference in sparql_registry_load_by_uri() (line 133 of C:\xampp\htdocs\Drupal77\drupal-7.7\sites\all\modules\sparql\sparql_registry\sparql_registry.module).
Strict warning: Only variables should be passed by reference in sparql_views_handler_field_subject->render_field_formatter() (line 17 of C:\xampp\htdocs\Drupal77\drupal-7.7\sites\all\modules\sparql_views\handlers\sparql_views_handler_field_subject.inc).

It's coming from a very simple view, where I just ask for the field 'URI' , resulting in this query:

SELECT ?definition
WHERE {
?definition ?p ?o  } 
LIMIT 100

Comments

netw3rker’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #1318048: Strict warning: Declaration of SparqlViewsResource::view() . there's a patch at comment #15 attached that will fix this problem.

daemonchrist’s picture

Issue summary: View changes
Status: Closed (duplicate) » Active

The patch in #1318048: Strict warning: Declaration of SparqlViewsResource::view() fixes the errors that start with "Strict warning: Declaration of SparqlViewsResource::view() should be compatible with that of Entity::...", but not the following:

Strict warning: Declaration of sparql_views_handler_argument::query() should be compatible with views_handler_argument::query($group_by = false) in _registry_check_code() (line 3179 of /var/www/drupal-7.34/includes/bootstrap.inc).
Strict warning: Declaration of sparql_views_handler_filter::op_equal() should be compatible with views_handler_filter_string::op_equal($field) in _registry_check_code() (line 3179 of /var/www/drupal-7.34/includes/bootstrap.inc).
Strict warning: Declaration of sparql_views_handler_filter_rdftype::op_equal() should be compatible with sparql_views_handler_filter::op_equal() in require_once() (line 8 of /var/www/sites/all/modules/sparql_views/handlers/sparql_views_handler_filter_rdftype.inc).
Strict warning: Declaration of sparql_views_handler_filter_language::op_equal() should be compatible with sparql_views_handler_filter::op_equal() in _registry_check_code() (line 3179 of /var/www/drupal-7.34/includes/bootstrap.inc).

daemonchrist’s picture

Title: Strict Warnings » Strict warning: Declaration of sparql_views_handler_argument::query() should be compatible with that of views_handler_argument::query()

Easier to deal with these warnings one at a time. We'll try to fix the first one in this issue.

Your second one, "Strict warning: Only variables should be passed by reference in sparql_registry_load_by_uri()" is fixed in issue #2053013: PHP strict warning in sparql_registry.

The third one, "Strict warning: Only variables should be passed by reference in sparql_views_handler_field_subject->render_field_formatter()", I haven't seen before, and should probably be filed as a separate bug.

Chang-Ting-Chuan’s picture

I have the same problem
Is there a solution?

Strict warning: Declaration of sparql_views_handler_argument::query() should be compatible with views_handler_argument::query($group_by = false) in include_once() (line 9 of /var/www/html/sites/all/modules/sparql_views/handlers/sparql_views_handler_argument.inc).

fishfree’s picture

+1 the same problem.