diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
index 2fae229af..84abb5653 100644
|
|
function bp_core_time_diff( $args = array() ) { |
1290 | 1290 | |
1291 | 1291 | foreach ( array( 'older_date', 'newer_date' ) as $date ) { |
1292 | 1292 | if ( ! $r[ $date ] ) { |
| 1293 | $r[ $date ] = 0; |
1293 | 1294 | continue; |
1294 | 1295 | } |
1295 | 1296 | |
1296 | | if ( ! is_numeric( $r[ $date ] ) ) { |
| 1297 | if ( preg_match( '/^\d{4}-\d{2}-\d{2}[ ]\d{2}:\d{2}:\d{2}$/', $r[ $date ] ) ) { |
1297 | 1298 | $time_chunks = explode( ':', str_replace( ' ', ':', $r[ $date ] ) ); |
1298 | 1299 | $date_chunks = explode( '-', str_replace( ' ', '-', $r[ $date ] ) ); |
1299 | 1300 | $r[ $date ] = gmmktime( |
… |
… |
function bp_core_time_diff( $args = array() ) { |
1304 | 1305 | (int) $date_chunks[2], |
1305 | 1306 | (int) $date_chunks[0] |
1306 | 1307 | ); |
| 1308 | } elseif ( ! is_int( $r[ $date ] ) ) { |
| 1309 | $r[ $date ] = 0; |
1307 | 1310 | } |
1308 | 1311 | } |
1309 | 1312 | |