Active
Project:
SPARQL Views
Version:
7.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2012 at 12:57 UTC
Updated:
18 Dec 2020 at 02:11 UTC
Jump to comment: Most recent
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
Comment #1
netw3rker commentedThis is a duplicate of #1318048: Strict warning: Declaration of SparqlViewsResource::view() . there's a patch at comment #15 attached that will fix this problem.
Comment #2
daemonchrist commentedThe 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).
Comment #3
daemonchrist commentedEasier 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.
Comment #4
Chang-Ting-Chuan commentedI 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).
Comment #5
fishfree commented+1 the same problem.