Title: PHP Warning on wp-cron.php call
Last modified: July 17, 2022

---

# PHP Warning on wp-cron.php call

 *  Resolved [Stefano Lissa](https://wordpress.org/support/users/satollo/)
 * (@satollo)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-warning-on-wp-cron-php-call/)
 * Hi, when some custom made scripts are invoked with php via command line, and 
   those scripts load WP, WordPress SEO is triggering this warning:
 * PHP Warning: Undefined array key “SERVER_NAME” in /…/wp-content/plugins/wordpress-
   seo/src/helpers/url-helper.php on line 245
 * since that constant is not defined for a direct php execution. I don’t know if
   it’s important for you to check that constant and take a different action if 
   not present, just reporting. 🙂
 * Have a nice day, Stefano.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * (@jeroenrotty)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-on-wp-cron-php-call/#post-15838761)
 * Hey [@satollo](https://wordpress.org/support/users/satollo/),
    Thank you for 
   reaching out about this to us.
 * We are aware of the notice, a bug report was created before and our development
   team is currently creating a fix for this – which will be included in our upcoming
   19.4 release.
    -  This reply was modified 3 years, 10 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
 *  [devnihil](https://wordpress.org/support/users/devnihil/)
 * (@devnihil)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-on-wp-cron-php-call/#post-15865192)
 * We are going ahead and marking this issue as resolved due to inactivity. If you
   require any further assistance please create a new issue.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Warning on wp-cron.php call’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 2 replies
 * 4 participants
 * Last reply from: [devnihil](https://wordpress.org/support/users/devnihil/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/php-warning-on-wp-cron-php-call/#post-15865192)
 * Status: resolved