[wp-trac] [WordPress Trac] #63408: PHP Warning/Notice MultiSite when running wp-cron from cli

WordPress Trac noreply at wordpress.org
Wed May 7 14:37:07 UTC 2025


#63408: PHP Warning/Notice MultiSite when running wp-cron from cli
--------------------------+-----------------------------
 Reporter:  elialum       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Cron API      |    Version:  6.8
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi,

 WordPress Multi site setup, when running the cron via the CLI, getting
 various PHP warnings/notices, depending on the PHP version.
 No plugin installed (besides the "beta tester" plugin), default  "Twenty
 Twenty-Four" theme

 **PHP 7.4**

 {{{
 $/opt/cpanel/ea-php74/root/bin/php /home/user/public_html/wp-cron.php

 Notice: Undefined index: HTTP_HOST in /home/user/public_html/wp-includes
 /ms-settings.php on line 62
 }}}

 **PHP 8.2**

 {{{
 $/opt/cpanel/ea-php82/root/bin/php /home/user/public_html/wp-cron.php

 Warning: Undefined array key "HTTP_HOST" in /home/user/public_html/wp-
 includes/ms-settings.php on line 62
 Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type
 string is deprecated in /home/user/public_html/wp-includes/ms-settings.php
 on line 62
 }}}


 **PHP 8.4**

 {{{
 $/opt/cpanel/ea-php84/root/bin/php /home/user/public_html/wp-cron.php

 PHP Warning:  PHP Startup: session.gc_divisor must be greater than 0 in
 Unknown on line 0
 Warning: Undefined array key "HTTP_HOST" in /home/user/public_html/wp-
 includes/ms-settings.php on line 62
 Deprecated: stripslashes(): Passing null to parameter #1 ($string) of type
 string is deprecated in /home/user/public_html/wp-includes/ms-settings.php
 on line 62

 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63408>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list