PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / trunk
MainWP Dashboard: Self-hosted WordPress Management for Agencies vtrunk
6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 5.2.2 5.3 All 153 releases
← All changes | modules/logs/includes/functions.php +7 -2 5.3trunk View file →
@@ -4,8 +4,13 @@
4 4 *
5 5 * @package MainWP\Dashboard
6 6 */
7 7
8 +// Exit.
9 +if ( ! defined( 'ABSPATH' ) ) {
10 + exit;
11 +}
12 +
8 13 /**
9 14 * Filters a variable with a specified filter.
10 15 *
11 16 * This is a polyfill function intended to be used in place of PHP's
@@ -31,9 +36,9 @@
31 36 * @return string an ISO 8601 extended formatted time
32 37 */
33 38 function mainwp_module_log_get_iso_8601_extended_date( $time = false, $offset = 0 ) {
34 39 if ( $time ) {
35 - $microtime = (float) $time . '.0000';
40 + $microtime = (float) ( $time . '.0000' );
36 41 } else {
37 42 $microtime = microtime( true );
38 43 }
39 44
@@ -40,8 +45,8 @@
40 45 $micro_seconds = sprintf( '%06d', ( $microtime - floor( $microtime ) ) * 1000000 );
41 46 $offset_string = sprintf( 'Etc/GMT%s%d', $offset < 0 ? '+' : '-', abs( $offset ) );
42 47
43 48 $timezone = new DateTimeZone( $offset_string );
44 - $date = new DateTime( gmdate( 'Y-m-d H:i:s.' . $micro_seconds, $microtime ), $timezone );
49 + $date = new DateTime( gmdate( 'Y-m-d H:i:s.' . $micro_seconds, (int) $microtime ), $timezone );
45 50
46 51 return $date->format( 'Y-m-d\TH:i:sO' );
47 52 }