Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.1.x Notice: Object of class Piwik_Date to string conversion #1328

Closed
mnlipp opened this issue May 5, 2010 · 4 comments
Closed

PHP 5.1.x Notice: Object of class Piwik_Date to string conversion #1328

mnlipp opened this issue May 5, 2010 · 4 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Milestone

Comments

@mnlipp
Copy link

mnlipp commented May 5, 2010

After updating to 0.6 I get the following error displayed all over the pages (and I wish I hadn't believed in the magic and made a backup...)

Notice: Object of class Piwik_Date to string conversion in /var/www/html/piwik/libs/Zend/Db/Statement/Pdo.php on line 228

Backtrace -->
#0 Piwik_ErrorHandler(8, Object of class Piwik_Date to string conversion, /var/www/html/piwik/libs/Zend/Db/Statement/Pdo.php, 228, Array ([=> Array (0 => 5,[=> 1,2 => Piwik_Date Object ([=> 1273017600, => UTC),[=> Piwik_Date Object ( => 1273017600,[=> UTC),4 => 1,[=> 2010-05-05 20:19:06,6 => done,[7] => 2)))
#1 PDOStatement->execute(Array ([=> 5,1 => 1,[=> Piwik_Date Object ( => 1273017600,[=> UTC),3 => Piwik_Date Object ([=> 1273017600, => UTC),[=> 1,5 => 2010-05-05 20:19:06,[=> done,7 => 2)) called at [/var/www/html/piwik/libs/Zend/Db/Statement/Pdo.php:228]
#2 Zend_Db_Statement_Pdo->_execute(Array ([=> 5,1 => 1,[=> Piwik_Date Object ( => 1273017600,[=> UTC),3 => Piwik_Date Object ([=> 1273017600, => UTC),[=> 1,5 => 2010-05-05 20:19:06,[=> done,7 => 2)) called at [/var/www/html/piwik/libs/Zend/Db/Statement.php:300]
#3 Zend_Db_Statement->execute(Array ([=> 5,1 => 1,[=> Piwik_Date Object ( => 1273017600,[=> UTC),3 => Piwik_Date Object ([=> 1273017600, => UTC),[=> 1,5 => 2010-05-05 20:19:06,[=> done,7 => 2)) called at [/var/www/html/piwik/libs/Zend/Db/Adapter/Abstract.php:468]
#4 Zend_Db_Adapter_Abstract->query(INSERT IGNORE INTO piwik2_archive_numeric_2010_05 (idarchive, idsite, date1, date2, period, ts_archived, name, value)

VALUES (?,?,?,?,?,?,?,?), Array ([=> 5,1 => 1,[=> Piwik_Date Object ( => 1273017600,[=> UTC),3 => Piwik_Date Object ([=> 1273017600, => UTC),[=> 1,5 => 2010-05-05 20:19:06,[=> done,7 => 2)) called at [/var/www/html/piwik/libs/Zend/Db/Adapter/Pdo/Abstract.php:238]
#5 Zend_Db_Adapter_Pdo_Abstract->query(INSERT IGNORE INTO piwik2_archive_numeric_2010_05 (idarchive, idsite, date1, date2, period, ts_archived, name, value)

VALUES (?,?,?,?,?,?,?,?), Array ([=> 5,1 => 1,[=> Piwik_Date Object ( => 1273017600,[=> UTC),3 => Piwik_Date Object ([=> 1273017600, => UTC),[=> 1,5 => 2010-05-05 20:19:06,[=> done,7 => 2)) called at [/var/www/html/piwik/core/PluginsFunctions/Sql.php:41]
#6 Piwik_Sql::query(INSERT IGNORE INTO piwik2_archive_numeric_2010_05 (idarchive, idsite, date1, date2, period, ts_archived, name, value)

VALUES (?,?,?,?,?,?,?,?), Array ([=> 5,1 => 1,[=> Piwik_Date Object ( => 1273017600,[=> UTC),3 => Piwik_Date Object ([=> 1273017600, => UTC),[=> 1,5 => 2010-05-05 20:19:06,[=> done,7 => 2)) called at [/var/www/html/piwik/core/PluginsFunctions/Sql.php:86]
#7 Piwik_Query(INSERT IGNORE INTO piwik2_archive_numeric_2010_05 (idarchive, idsite, date1, date2, period, ts_archived, name, value)

VALUES (?,?,?,?,?,?,?,?), Array ([=> 5,1 => 1,[=> Piwik_Date Object ( => 1273017600,[=> UTC),3 => Piwik_Date Object ([=> 1273017600, => UTC),[=> 1,5 => 2010-05-05 20:19:06,[=> done,7 => 2)) called at [/var/www/html/piwik/core/ArchiveProcessing.php:634]
#8 Piwik_ArchiveProcessing->insertRecord(Piwik_ArchiveProcessing_Record_Numeric Object ([=> done,value => 2)) called at [/var/www/html/piwik/core/ArchiveProcessing.php:567]
#9 Piwik_ArchiveProcessing->insertNumericRecord(done, 2) called at [/var/www/html/piwik/core/ArchiveProcessing.php:428]
#10 Piwik_ArchiveProcessing->initCompute() called at [/var/www/html/piwik/core/ArchiveProcessing.php:409]
#11 Piwik_ArchiveProcessing->launchArchiving() called at [/var/www/html/piwik/core/Archive/Single.php:185]
#12 Piwik_Archive_Single->prepareArchive() called at [/var/www/html/piwik/core/Archive.php:170]
#13 Piwik_Archive::build(1, day, 2010-05-05) called at [/var/www/html/piwik/plugins/Referers/API.php:44]
#14 Piwik_Referers_API->getDataTable(Referers_searchEngineByKeyword, 1, day, 2010-05-05, ) called at [/var/www/html/piwik/plugins/Referers/API.php:73]
#15 Piwik_Referers_API->getKeywords(1, day, 2010-05-05, )
#16 call_user_func_array(Array ([=> Piwik_Referers_API Object (),1 => getKeywords), Array ([=> 1,1 => day,[=> 2010-05-05,3 => )) called at [/var/www/html/piwik/core/API/Proxy.php:147]
#17 Piwik_API_Proxy->call(Piwik_Referers_API, getKeywords, Array ([=> Referers.getKeywords,format => original,[=> 10,filter_sort_column => nb_visits,[=> desc,module => Referers,[=> getKeywords,idSite => 1,[=> day,date => 2010-05-05)) called at [/var/www/html/piwik/core/API/Request.php:113]
#18 Piwik_API_Request->process() called at [/var/www/html/piwik/core/ViewDataTable.php:341]
#19 Piwik_ViewDataTable->loadDataTableFromAPI() called at [/var/www/html/piwik/core/ViewDataTable/HtmlTable.php:75]
#20 Piwik_ViewDataTable_HtmlTable->main() called at [/var/www/html/piwik/core/Controller.php:153]
#21 Piwik_Controller->renderView(Piwik_ViewDataTable_HtmlTable Object ([=> ,arrayDataTable => ,[=> CoreHome/templates/datatable.tpl, => 1,[=> Array (enable_sort => 1,[=> nb_visits,filter_sort_order => desc,[=> 10), => Array ([=> ,show_search => 1,[=> 1,show_table_all_columns => 1,[=> 1,show_export_as_image_icon => ,[=> ,show_offset_information => 1,[=> 1,show_footer_icons => 1,[=> Referers.getKeywords,uniqueId => ReferersgetKeywords),[=> 0, => ,[=> getKeywords, => Referers,[=> getSearchEnginesFromKeywordId, => Referers.getKeywords,[=> , => Array ([=> Stichwort,nb_visits => Besucher,[=> Aktionen,max_actions => Maximale Aktionen bei einem Besuch,[=> Von Besuchern verbrachte Gesamtzeit (in Sekunden),nb_uniq_visitors => Eindeutige Besucher,[=> Aktionen pro Besuch,avg_time_on_site => Durchschnittszeit auf der Seite,[=> Absprungsrate,revenue_per_visit => Wert pro Besuch,[=> Besuche mit Konversionen), => Array ([=> label,1 => nb_visits),[=> 1), ) called at /var/www/html/piwik/plugins/Referers/Controller.php:91
#22 Piwik_Referers_Controller->getKeywords()
#23 call_user_func_array(Array ([=> Piwik_Referers_Controller Object ( => Array ([=> Referers_DirectEntry,2 => Referers_SearchEngines,[=> Referers_Websites,6 => Referers_Campaigns),[=> Referers, => 2010-05-05,[=> Piwik_Date Object ( => 1273017600,[=> UTC), => 1,[=> Piwik_Site Object ( => 1),[=> Array (label => General_ColumnLabel,[=> General_ColumnNbVisits,nb_actions => General_ColumnNbActions,[=> General_ColumnMaxActions,sum_visit_length => General_ColumnSumVisitLength,[=> General_ColumnNbUniqVisitors,nb_actions_per_visit => General_ColumnActionsPerVisit,[=> General_ColumnAvgTimeOnSite,bounce_rate => General_ColumnBounceRate,[=> General_ColumnValuePerVisit,goals_conversion_rate => General_ColumnVisitsWithConversions)),[=> getKeywords), Array ()) called at /var/www/html/piwik/core/FrontController.php:129
#24 Piwik_FrontController->dispatch() called at [/var/www/html/piwik/index.php:59]

@robocoder
Copy link
Contributor

PHP 5.1.x, right?

Please try the attached patch. (I'm not sure the change to core/ViewDataTable/GenerateGraphData/ChartEvolution.php is necessary.)

@robocoder
Copy link
Contributor

Attachment:
1328.patch

@mnlipp
Copy link
Author

mnlipp commented May 6, 2010

Great, thank you very much, it works now!

And yes, PHP 5.1.6, mentioned as sufficient in the technical requirements (I know it's old, but these server editions, CentOS in my case, move on slowly).

Somehow, I had assumed that new releases would still be tested on this platform...

@mattab
Copy link
Member

mattab commented May 6, 2010

(In [2141]) Fixes #1328 patch from Anthon

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

3 participants