Title: PHP Notice
Last modified: July 7, 2017

---

# PHP Notice

 *  [prbond](https://wordpress.org/support/users/prbond/)
 * (@prbond)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/php-notice-92/)
 * Hello
    I have a php notice : [07-Jul-2017 14:20:00 UTC] PHP Notice: Undefined
   index: HTTP_HOST in wp-content/plugins/custom-content-shortcode/includes/modules/
   url.php on line 44
 * static function init() {
 *  global $wp;
 *  // Get routes
    self::$route = $wp->request; self::$routes = explode(‘/’, self::
   $route);
 *  // Get queries: direct method
    $request_url = untrailingslashit( ‘[http://&#8217](http://&#8217);.
   $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’] );
 * [https://stackoverflow.com/questions/12347048/undefined-index-http-host-even-though-it-is-checked](https://stackoverflow.com/questions/12347048/undefined-index-http-host-even-though-it-is-checked)
 * You need test $_SERVER[‘HTTP_HOST’] is set before use it
 * regards

 The topic ‘PHP Notice’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [prbond](https://wordpress.org/support/users/prbond/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/php-notice-92/)
 * Status: not resolved