Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

E_STRICT - Declaration of Piwik_Archive_Array::loadMetadata() incompatible #1410

Closed
anonymous-piwik-user opened this Issue · 2 comments

2 participants

@anonymous-piwik-user

Small bug, after visit Dashboard page in logfile appear following error:

"2010-06-02T16:00:48+00:00" "2048" "Declaration of Piwik_Archive_Array_IndexedByDate::loadMetadata() should be compatible with that of Piwik_Archive_Array::loadMetadata()" "/usr/local/www/smartsolutions/gas/inc/piwik/core/Archive/Array/IndexedByDate.php" "17" 
#0  Piwik_ErrorHandler(2048, Declaration of Piwik_Archive_Array_IndexedByDate::loadMetadata() should be compatible with that of Piwik_Archive_Array::loadMetadata(), /usr/local/www/smartsolutions/gas/inc/piwik/core/Archive/Array/IndexedByDate.php, 17, Array ([class] => Piwik_Archive_Array_IndexedByDate,[classPath] => Archive/Array/IndexedByDate,[i] => 0,[path] => /usr/local/www/smartsolutions/gas/inc/piwik/core/Archive/Array/IndexedByDate.php)) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Archive/Array/IndexedByDate.php:17]
#1  require_once(/usr/local/www/smartsolutions/gas/inc/piwik/core/Archive/Array/IndexedByDate.php) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Loader.php:63]
#2  Piwik_Loader::autoload(Piwik_Archive_Array_IndexedByDate)
#3  spl_autoload_call(Piwik_Archive_Array_IndexedByDate) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Archive.php:145]
#4  Piwik_Archive::build(1, day, 2010-05-04,2010-06-02) called at [/usr/local/www/smartsolutions/gas/inc/piwik/plugins/VisitFrequency/API.php:33]
#5  Piwik_VisitFrequency_API->get(1, day, 2010-05-04,2010-06-02, Array ([0] => nb_visits_returning))
#6  call_user_func_array(Array ([0] => Piwik_VisitFrequency_API Object (),[1] => get), Array ([0] => 1,[1] => day,[2] => 2010-05-04,2010-06-02,[3] => Array ([0] => nb_visits_returning))) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/API/Proxy.php:147]
#7  Piwik_API_Proxy->call(Piwik_VisitFrequency_API, get, Array ([method] => VisitFrequency.get,[format] => original,[disable_queued_filters] => 1,[module] => VisitFrequency,[action] => getEvolutionGraph,[idSite] => 1,[period] => day,[date] => 2010-05-04,2010-06-02,[viewDataTable] => generateDataChartEvolution,[columns] => Array ([0] => nb_visits_returning))) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/API/Request.php:107]
#8  Piwik_API_Request->process() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable.php:353]
#9  Piwik_ViewDataTable->loadDataTableFromAPI() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphData.php:103]
#10 Piwik_ViewDataTable_GenerateGraphData->main() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Controller.php:153]
#11 Piwik_Controller->renderView(Piwik_ViewDataTable_GenerateGraphData_ChartEvolution Object ([] => ,[] => ,[] => 1,[] => ,[] => 1,[] => Array ([filter_limit] => ,[disable_queued_filters] => 1),[] => Array ([show_goals] => ,[show_search] => 1,[show_table] => 1,[show_table_all_columns] => 1,[show_all_views_icons] => 1,[show_export_as_image_icon] => ,[show_exclude_low_population] => 1,[show_offset_information] => 1,[show_footer] => 1,[show_footer_icons] => 1,[apiMethodToRequestDataTable] => VisitFrequency.get,[uniqueId] => VisitFrequencygetEvolutionGraph),[] => 0,[] => ,[] => Array (),[] => getEvolutionGraph,[] => VisitFrequency,[] => ,[] => VisitFrequency.get,[] => Piwik_Visualization_Chart_Evolution Object ([] => open_flash_chart Object ([elements] => Array ()),[] => Array (),[] => Array (),[] => 2,[] => Array (),[] => Array (),[] => ,[] => ,[] => ,[] => 1),[] => Array ([nb_visits_returning] =>  ,[nb_actions_returning] =>    ,[max_actions_returning] => .    ,[sum_visit_length_returning] =>   ,    (),[bounce_rate_returning] =>     ,[label] => ,[nb_visits] => ,[nb_actions] => ,[max_actions] => .    ,[sum_visit_length] =>      (),[nb_uniq_visitors] =>  ,[nb_actions_per_visit] =>   ,[avg_time_on_site] => .   ,[bounce_rate] =>  ,     ,[revenue_per_visit] =>  ,[goals_conversion_rate] =>  ),[] => Array ([0] => nb_visits_returning)), ) called at [/usr/local/www/smartsolutions/gas/inc/piwik/plugins/VisitFrequency/Controller.php:49]
#12 Piwik_VisitFrequency_Controller->getEvolutionGraph()
#13 call_user_func_array(Array ([0] => Piwik_VisitFrequency_Controller Object ([] => VisitFrequency,[] => ,[] => ,[] => 1,[] => Piwik_Site Object ([] => 1),[] => Array ([label] => General_ColumnLabel,[nb_visits] => General_ColumnNbVisits,[nb_actions] => General_ColumnNbActions,[max_actions] => General_ColumnMaxActions,[sum_visit_length] => General_ColumnSumVisitLength,[nb_uniq_visitors] => General_ColumnNbUniqVisitors,[nb_actions_per_visit] => General_ColumnActionsPerVisit,[avg_time_on_site] => General_ColumnAvgTimeOnSite,[bounce_rate] => General_ColumnBounceRate,[revenue_per_visit] => General_ColumnValuePerVisit,[goals_conversion_rate] => General_ColumnVisitsWithConversions)),[1] => getEvolutionGraph), Array ()) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/FrontController.php:126]
#14 Piwik_FrontController->dispatch(VisitFrequency, getEvolutionGraph, Array ()) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/FrontController.php:144]
#15 Piwik_FrontController->fetchDispatch(VisitFrequency, getEvolutionGraph, Array ()) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphHTML.php:146]
#16 Piwik_ViewDataTable_GenerateGraphHTML->getFlashData() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphHTML.php:109]
#17 Piwik_ViewDataTable_GenerateGraphHTML->buildView() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphHTML.php:90]
#18 Piwik_ViewDataTable_GenerateGraphHTML->main() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Controller.php:153]
#19 Piwik_Controller->renderView(Piwik_ViewDataTable_GenerateGraphHTML_ChartEvolution Object ([] => 100%,[] => 150,[] => evolution,[] => CoreHome/templates/graph.tpl,[] => 1,[] => Array (),[] => Array ([show_goals] => ,[show_search] => ,[show_table] => ,[show_table_all_columns] => 1,[show_all_views_icons] => ,[show_export_as_image_icon] => 1,[show_exclude_low_population] => ,[show_offset_information] => ,[show_footer] => 1,[show_footer_icons] => 1,[apiMethodToRequestDataTable] => VisitFrequency.get,[uniqueId] => VisitFrequencygetEvolutionGraph),[] => 0,[] => ,[] => Array (),[] => getEvolutionGraph,[] => VisitFrequency,[] => ,[] => VisitFrequency.get,[] => ,[] => Array ([nb_visits_returning] =>  ,[nb_actions_returning] =>    ,[max_actions_returning] => .    ,[sum_visit_length_returning] =>   ,    (),[bounce_rate_returning] =>     ,[label] => ,[nb_visits] => ,[nb_actions] => ,[max_actions] => .    ,[sum_visit_length] =>      (),[nb_uniq_visitors] =>  ,[nb_actions_per_visit] =>   ,[avg_time_on_site] => .   ,[bounce_rate] =>  ,     ,[revenue_per_visit] =>  ,[goals_conversion_rate] =>  ),[] => Array (),[parametersToModify] => Array ([viewDataTable] => generateDataChartEvolution,[module] => VisitFrequency,[action] => getEvolutionGraph,[date] => 2010-05-04,2010-06-02,[columns] => Array ([0] => nb_visits_returning)),[uniqueIdViewDataTable] => VisitFrequencygetEvolutionGraph,[chartDivId] => VisitFrequencygetEvolutionGraphChart_swf,[includeData] => 1), 1) called at [/usr/local/www/smartsolutions/gas/inc/piwik/plugins/VisitFrequency/Controller.php:49]
#20 Piwik_VisitFrequency_Controller->getEvolutionGraph(1, Array ([0] => nb_visits_returning)) called at [/usr/local/www/smartsolutions/gas/inc/piwik/plugins/VisitFrequency/Controller.php:22]
#21 Piwik_VisitFrequency_Controller->index()
#22 call_user_func_array(Array ([0] => Piwik_VisitFrequency_Controller Object ([] => VisitFrequency,[] => 2010-06-02,[] => Piwik_Date Object ([] => 1275505248,[] => UTC),[] => 1,[] => Piwik_Site Object ([] => 1),[] => Array ([label] => General_ColumnLabel,[nb_visits] => General_ColumnNbVisits,[nb_actions] => General_ColumnNbActions,[max_actions] => General_ColumnMaxActions,[sum_visit_length] => General_ColumnSumVisitLength,[nb_uniq_visitors] => General_ColumnNbUniqVisitors,[nb_actions_per_visit] => General_ColumnActionsPerVisit,[avg_time_on_site] => General_ColumnAvgTimeOnSite,[bounce_rate] => General_ColumnBounceRate,[revenue_per_visit] => General_ColumnValuePerVisit,[goals_conversion_rate] => General_ColumnVisitsWithConversions)),[1] => index), Array ()) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/FrontController.php:126]
#23 Piwik_FrontController->dispatch() called at [/usr/local/www/smartsolutions/gas/inc/piwik/index.php:59]

E_STRICT level error, because different declarations in parent and child classes, i don't know project's architecture and can't advise what is better way:
1) add type hint (Piwik_Archive) into parent class (Piwik_Archive_Array);
or
2) remove type hint from children class (Piwik_Archive_Array_IndexedByDate)

@anonymous-piwik-user

PHP 5.2.13
PIWIK 0.6.2

@robocoder

(In [2261]) fixes #1410 - remove type hint; add phpdoc

@anonymous-piwik-user anonymous-piwik-user added this to the Piwik 0.6.3 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.