CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • mktime parameter error on contributions dashboard page after upgrade
Pages: [1]

Author Topic: mktime parameter error on contributions dashboard page after upgrade  (Read 1271 times)

JulieR

  • I post occasionally
  • **
  • Posts: 52
  • Karma: 5
mktime parameter error on contributions dashboard page after upgrade
August 17, 2010, 02:44:30 pm
I just finished upgrading civicrm from 3.1.2 to 3.2 and drupal from 6.15 to 6.19.  Since then, I get the following error on the contributions dashboard:

warning: mktime() expects parameter 6 to be long, string given in [mysite]/sites/all/modules/civicrm/CRM/Contribute/Form/ContributionCharts.php on line 194.

I just double checked and the same thing is visible on the demo site... yet I don't see any other references to it on the forums (except some similar old errors appearing in different contexts).  Have I missed some info on this somewhere?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: mktime parameter error on contributions dashboard page after upgrade
August 18, 2010, 02:31:33 pm

JulieR:

in case u r a dev / tech person, can you edit that file CRM/Contribute/Form/ContributionCharts.php and try to figure out why it is giving u that error message. It seems like something in your dataset is triggering that bug, and hence u get that warning.

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

JulieR

  • I post occasionally
  • **
  • Posts: 52
  • Karma: 5
Re: mktime parameter error on contributions dashboard page after upgrade
August 24, 2010, 09:21:23 am
Lobo, the demo site is showing the same error message, so it's not just my data.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: mktime parameter error on contributions dashboard page after upgrade
August 24, 2010, 09:49:10 am

what url? did not see it on the contribution dashboard

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: mktime parameter error on contributions dashboard page after upgrade
August 31, 2010, 02:21:56 am
I have a site with this same issue. I added

Code: [Select]
echo "index is '$index'<br>\n";
and I see:

Quote
index is ''
index is '2005'
index is '2006'
index is '2007'
index is '2008'
index is '2009'
index is '2010'
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: mktime parameter error on contributions dashboard page after upgrade
August 31, 2010, 08:08:59 am

here's the patch. will be part of 3.2.3

Code: [Select]
svn diff CRM/Contribute/BAO/Contribution/Utils.php
Index: CRM/Contribute/BAO/Contribution/Utils.php
===================================================================
--- CRM/Contribute/BAO/Contribution/Utils.php   (revision 29484)
+++ CRM/Contribute/BAO/Contribution/Utils.php   (working copy)
@@ -328,11 +328,11 @@
               AND contrib.contribution_status_id = 1
         GROUP BY contribYear
         ORDER BY contribYear";
-        $dao = CRM_Core_DAO::executeQuery( $query, CRM_Core_DAO::$_nullArray );
+        $dao = CRM_Core_DAO::executeQuery( $query );
         
         $params = null;
         while ( $dao->fetch( ) ) {
-            if ( $dao->contribYear ) {
+            if ( ! empty( $dao->contribYear ) ) {
                 $params['By Year'][$dao->contribYear] = $dao->ctAmt;
             }
         }
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: mktime parameter error on contributions dashboard page after upgrade
August 31, 2010, 10:26:44 am
Perfect. Thank you.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • mktime parameter error on contributions dashboard page after upgrade

This forum was archived on 2017-11-26.