Making WordPress.org


Ignore:
Timestamp:
01/13/2015 07:45:36 PM (12 years ago)
Author:
iandunn
Message:

Central Theme: Cast timestamp to int to avoid PHP notices.

date() expects the timestamp to be an integer, but we're storing it as a string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-central-2012/functions.php

    r1127 r1137  
    619619
    620620                foreach ( $wordcamps as $wordcamp ) {
    621                         if ( $year = date( 'Y', get_post_meta( $wordcamp->ID, 'Start Date (YYYY-mm-dd)', true ) ) ) {
     621                        if ( $year = date( 'Y', (int) get_post_meta( $wordcamp->ID, 'Start Date (YYYY-mm-dd)', true ) ) ) {
    622622                                $grouped_wordcamps[ $year ][] = $wordcamp;
    623623                        }
Note: See TracChangeset for help on using the changeset viewer.