adjusting dates again
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 24 Aug 2016 19:50:03 +0000 (15:50 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 24 Aug 2016 19:50:03 +0000 (15:50 -0400)
make sure monthly $date is correctly created using mktime

models/admin/ajax/statCollector.php

index 3cfb582..990f026 100644 (file)
@@ -217,7 +217,7 @@ class GlmMembersAdmin_ajax_statCollector
         if ( $results ) {
             foreach ( $results as $stat ) {
                 if ( preg_match( '%(\d{4})(\d{2})%', $stat['monthly'], $matches ) ) {
-                    $date = date( "Y-m-d", strtotime( $matches[1]."-".$matches[2]."-01" ) );
+                    $date = date( "Y-m-d", mktime( 0, 0, 0, $matches[2], 1, $matches[1] ) );
                 } else {
                     return false;
                 }