Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#1410 closed Bug (fixed)

E_STRICT - Declaration of Piwik_Archive_Array::loadMetadata() incompatible

Reported by: Gas Owned by:
Priority: normal Milestone: Piwik 0.6.3
Component: Core Keywords:
Cc: Sensitive: no

Description

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)

Change History (4)

comment:1 Changed 4 years ago by Gas

PHP 5.2.13
PIWIK 0.6.2

comment:2 Changed 4 years ago by vipsoft (robocoder)

  • Milestone set to 0 - Piwik 0.6.3

comment:3 Changed 4 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:4 Changed 4 years ago by vipsoft (robocoder)

  • Summary changed from Declaration of Piwik_Archive_Array::loadMetadata() to E_STRICT - Declaration of Piwik_Archive_Array::loadMetadata() incompatible
Note: See TracTickets for help on using tickets.