Title: PHP Warnings in code.
Last modified: August 22, 2016

---

# PHP Warnings in code.

 *  Resolved [Robert](https://wordpress.org/support/users/rl421403/)
 * (@rl421403)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/)
 * I am using latest version of this plugin and I see lots of PHP Warnings in logs.
 * I checked with debug enabled and yes these are there.
 * > `PHP Notice: Undefined index: HTTP_HOST in /mydomain.com/public_html/wp-content/
   > plugins/user-submitted-posts/user-submitted-posts.php on line 179`
 * Although it’s nothing major because it does not break the functionality of the
   plugin but it should not be there.
 * [https://wordpress.org/plugins/user-submitted-posts/](https://wordpress.org/plugins/user-submitted-posts/)

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

 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318090)
 * Hi Robert, are you seeing any actual “PHP Warnings in code” or are they all Notices?
 *  Thread Starter [Robert](https://wordpress.org/support/users/rl421403/)
 * (@rl421403)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318092)
 * Yes, sorry. I checked and these are all PHP Notices. And it does not break functionality
   of the plugin.
 * But the size of my logs increases by couple of MBs each day. Can you fix these
   in next update?
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318095)
 * Yes, I’ll see what I can do for the next update, which is planned for this week.
   Thank you for the feedback.
 *  Thread Starter [Robert](https://wordpress.org/support/users/rl421403/)
 * (@rl421403)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318097)
 * That’s great!
 * I am a big follower of your blogs (perishablepress & digwp). And I have learned
   a lot from these two. 🙂
 *  Thread Starter [Robert](https://wordpress.org/support/users/rl421403/)
 * (@rl421403)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318215)
 * I was digging into more and found that wp-load.php is not loaded correctly.
 * > require(‘../../../../wp-load.php’);
 * This gives error if we have moved wp-content directory to custom location. Shouldn’t
   you use ABSPATH or some other better methods. [Don’t include wp-load, please](http://ottopress.com/2010/dont-include-wp-load-please/)
 * More php notices caused by plugin.
 * > `PHP Notice: Undefined index: HTTP_HOST in /mydomain.com/public_html/wp-content/
   > plugins/user-submitted-posts/user-submitted-posts.php on line 179
   >  PHP Notice:
   > Undefined index: user-submitted-tags in /mydomain.com/public_html/wp-content/
   > plugins/user-submitted-posts/user-submitted-posts.php on line 105 PHP Notice:
   > Undefined index: user-submitted-category in /mydomain.com/public_html/wp-content/
   > plugins/user-submitted-posts/user-submitted-posts.php on line 107 PHP Notice:
   > Undefined index: user-submitted-content in /mydomain.com/public_html/wp-content/
   > plugins/user-submitted-posts/user-submitted-posts.php on line 108`
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318216)
 * Hey thanks – will add these to the list!
 *  Thread Starter [Robert](https://wordpress.org/support/users/rl421403/)
 * (@rl421403)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318218)
 * Thanks Jeff, for responding so fast and trying to fix all these issues.
 * No disrespect to you but I think I will stay away from this plugin for a while.
   These notices and warnings are just tip of the iceberg and not following coding
   standards. All JavaScript libraries are loaded from PHP file instead of enqueuing
   standard jQuery plugins (like Jquery Cookie or Parsley JS) individually with 
   wp_enqueue_script. There are more issues.
 * Although it’s still a good plugin and kinda works but I was expecting more, at
   least better coding since I always follow your blog for best practices. Anyway
   thanks for your help.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318219)
 * Yes, the free version of the plugin was written years ago, so there is a lot 
   that needs updated. FYI, the Pro version of the plugin was written at the beginning
   of this year and is 100% up to date with the WP API and WP Standards. For the
   sake of others reading, btw, the free version continues to work 100% as advertised
   and without errors.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318295)
 * Just to follow-up with this, the latest version of the plugin addresses the wp-
   load.php issue, which now is replaced with a proper method in version 20140927.
   Also, the JavaScript files are now loaded individually, as required/per settings.
   Many other great improvements such as 14 filter/action hooks, customizable form
   templates and much more: [https://wordpress.org/plugins/user-submitted-posts/](https://wordpress.org/plugins/user-submitted-posts/)
 *  Thread Starter [Robert](https://wordpress.org/support/users/rl421403/)
 * (@rl421403)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318309)
 * Thanks Jeff for following up.
 * I am now using **Contact Form 7** plugin to create posts/custom posts and uploading
   featured thumbs. Contact Form 7 has tons of hooks for that as well as it’s well
   documented. And since it’s highly customizable, now I can create unlimited forms
   and customize them as I require without modifying core plugin files.
 * The other reason why I choose Contact Form 7 because I was already using this
   plugin for website contact forms. So I did not want my website to overload with
   another plugin and couple of JS/CSS files for a feature that I could achieve 
   with existing plugin.
 * Although I checked updated version of USP and it looks nice.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318310)
 * Lol, that’s great to hear, and I should point out that all of that (and more)
   can be done with the latest version of User Submitted Posts, thanks in part to
   super feedback from people like you. **Features of User Submitted Posts** include:
    - Let visitors submit posts from anywhere on your site
    - Option to set submitted images as featured images
    - Option to use WP’s built-in rich text editor for post content
    - Use template tag or shortcode to display the submission form anywhere
    - Includes input validation and customizable captcha and hidden field to stop
      spam
    - Post submissions may include title, tags, category, author, url, post and 
      image(s)
    - Redirect user to anywhere or return to current page after successful post 
      submission
    - Includes a set of template tags for displaying and customizing user-submitted
      posts
    - HTML5 submission form with streamlined CSS styles
    - NEW! Use your own custom form template and stylesheet
    - NEW! 14 action/filter hooks for advanced customization
 * **More Features**
    - Option to receive email alert for new submitted posts
    - Option to set logged-in username as submitted-post author
    - Option to set logged-in user’s URL as the submitted URL
    - Option to set a default submission category via hidden field
    - Option to disable loading of external JavaScript file
    - Option to specify URL for targeted resource loading
    - Multiple emails supported in email alerts
 * **Image Uploads**
    - Optionally allow/require visitors to upload any number of images
    - Specify minimum and maximum width and height for uploaded images
    - Specicy minimum and maximum number of allowed image uploads for each post
    - Includes jQuery snippet for easy choosing of multiple images
 * **Customization**
    - Control which fields are displayed in the submission form
    - Choose which categories users are allowed to select
    - Assign submitted posts to any registered user
    - Customizable success, error, and upload messages
    - Plus options for the captcha, auto-publish, and redirect-URL
    - Option to use classic form, HTML5 form, or disable only the stylesheet
 * And just FYI, there is a Pro version of USP that can do even 1,000,000 times 
   more. Check it out @ [http://plugin-planet.com/usp-pro/](http://plugin-planet.com/usp-pro/)
 * In any case, glad to hear you managed to find something that works. Best of luck.
 *  Thread Starter [Robert](https://wordpress.org/support/users/rl421403/)
 * (@rl421403)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318311)
 * > Lol,
 * Why lol??? I don’t understand the sarcasm.
 *  Plugin Author [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * (@specialk)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318312)
 * No sarcasm intended, just not taking any of this too seriously 🙂

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

The topic ‘PHP Warnings in code.’ is closed to new replies.

 * ![](https://ps.w.org/user-submitted-posts/assets/icon-256x256.png?rev=2567685)
 * [User Submitted Posts – Enable Users to Submit Posts from the Front End](https://wordpress.org/plugins/user-submitted-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-submitted-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-submitted-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/user-submitted-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-submitted-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-submitted-posts/reviews/)

## Tags

 * [notice](https://wordpress.org/support/topic-tag/notice/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 13 replies
 * 2 participants
 * Last reply from: [Jeff Starr](https://wordpress.org/support/users/specialk/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/php-warnings-in-code/#post-5318312)
 * Status: resolved