Skip to content

Commit 9dc23d0

Browse files
committed
timer_float() does not exist in WordPress 5.*
1 parent f37405e commit 9dc23d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/WpMatomo/AIBotTracking.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function do_ai_bot_tracking( $url = null ) {
108108
$response_code = http_response_code();
109109
$request_elapsed_ms = null;
110110

111-
if ( empty( $GLOBALS['MATOMO_IN_AI_ESI'] ) ) {
111+
if ( empty( $GLOBALS['MATOMO_IN_AI_ESI'] ) && function_exists( 'timer_float' ) ) {
112112
$request_elapsed_ms = (int) ( \timer_float() * 1000 );
113113
}
114114

0 commit comments

Comments
 (0)