@anonymous-piwik-user opened this Issue on June 3rd 2010

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" 
<a href='/0'>#0</a>  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]
<a href='/1'>#1</a>  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]
<a href='/2'>#2</a>  Piwik_Loader::autoload(Piwik_Archive_Array_IndexedByDate)
<a href='/3'>#3</a>  spl_autoload_call(Piwik_Archive_Array_IndexedByDate) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Archive.php:145]
<a href='/4'>#4</a>  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]
<a href='/5'>#5</a>  Piwik_VisitFrequency_API->get(1, day, 2010-05-04,2010-06-02, Array ([0] => nb_visits_returning))
<a href='/6'>#6</a>  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]
<a href='/7'>#7</a>  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]
<a href='/8'>#8</a>  Piwik_API_Request->process() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable.php:353]
<a href='/9'>#9</a>  Piwik_ViewDataTable->loadDataTableFromAPI() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphData.php:103]
<a href='/10'>#10</a> Piwik_ViewDataTable_GenerateGraphData->main() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Controller.php:153]
<a href='/11'>#11</a> 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]
<a href='/12'>#12</a> Piwik_VisitFrequency_Controller->getEvolutionGraph()
<a href='/13'>#13</a> 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]
<a href='/14'>#14</a> Piwik_FrontController->dispatch(VisitFrequency, getEvolutionGraph, Array ()) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/FrontController.php:144]
<a href='/15'>#15</a> Piwik_FrontController->fetchDispatch(VisitFrequency, getEvolutionGraph, Array ()) called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphHTML.php:146]
<a href='/16'>#16</a> Piwik_ViewDataTable_GenerateGraphHTML->getFlashData() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphHTML.php:109]
<a href='/17'>#17</a> Piwik_ViewDataTable_GenerateGraphHTML->buildView() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/ViewDataTable/GenerateGraphHTML.php:90]
<a href='/18'>#18</a> Piwik_ViewDataTable_GenerateGraphHTML->main() called at [/usr/local/www/smartsolutions/gas/inc/piwik/core/Controller.php:153]
<a href='/19'>#19</a> 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]
<a href='/20'>#20</a> Piwik_VisitFrequency_Controller->getEvolutionGraph(1, Array ([0] => nb_visits_returning)) called at [/usr/local/www/smartsolutions/gas/inc/piwik/plugins/VisitFrequency/Controller.php:22]
<a href='/21'>#21</a> Piwik_VisitFrequency_Controller->index()
<a href='/22'>#22</a> 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]
<a href='/23'>#23</a> 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 commented on June 3rd 2010

PHP 5.2.13
PIWIK 0.6.2

@robocoder commented on June 3rd 2010 Contributor

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

This Issue was closed on June 3rd 2010
Powered by GitHub Issue Mirror