From 663c6315c96ec462ac272214f1b2c277d23ad542 Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Thu, 11 May 2023 14:40:47 +0200 Subject: [PATCH] make debug file optional --- activitypub.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/activitypub.php b/activitypub.php index 3e2d98f..1f42652 100644 --- a/activitypub.php +++ b/activitypub.php @@ -88,8 +88,9 @@ if ( \get_option( 'blog_public', 1 ) ) { Rest\NodeInfo::init(); } -if ( \WP_DEBUG ) { - require_once \dirname( __FILE__ ) . '/includes/debug.php'; +$debug_file = \dirname( __FILE__ ) . '/includes/debug.php'; +if ( \WP_DEBUG && file_exists( $debug_file ) && is_readable( $debug_file ) ) { + require_once $debug_file; } /**