Fatal Error: mktime() Expects at Least 1 Argument in main.php
-
Hi Niels,
I encountered a fatal error in the Comment Approved plugin:
Fatal error: Uncaught ArgumentCountError: mktime() expects at least 1 argument, 0 given in /path/to/plugin/comment-approved/classes/main.php:410
The issue is caused by the use of?mktime()?without arguments at line 410 in?main.php:
add_comment_meta( $comment_id, 'notify_me', mktime() );
I suggest replacing it with:
add_comment_meta( $comment_id, 'notify_me', current_time( 'timestamp' ) );
This resolves the error and aligns with WordPress standards.
Thank you!
- You must be logged in to reply to this topic.