Title: Notice: Undefined variable
Last modified: August 20, 2016

---

# Notice: Undefined variable

 *  Resolved [another-webmaster](https://wordpress.org/support/users/another-webmaster/)
 * (@another-webmaster)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/)
 * Working with wampserver 2.2 here and WP** 3.5.2** alpha.
    Following keeps the
   plugin from working 🙁
 * Debug noticed this:
    Notice: Undefined variable: wti_voted_message in \wp-content\
   plugins\wti-like-post\wti_like_post.php on line 765
 * Any idea how to solve? Thanks in advance for time and effort.
 * [http://wordpress.org/extend/plugins/wti-like-post/](http://wordpress.org/extend/plugins/wti-like-post/)

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

 *  Plugin Author [webtechideas](https://wordpress.org/support/users/webtechideas/)
 * (@webtechideas)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623055)
 * Open the plugin file wti_like_post.php in any text editor like Notepad++ and 
   find out the function GetWtiVotedMessage.
 * After the line `global $wpdb;`,
 * add the following line `$wti_voted_message = '';`
 * **Note:**
    If your site is live, then you should have NOTICE messages disabled.
 *  Thread Starter [another-webmaster](https://wordpress.org/support/users/another-webmaster/)
 * (@another-webmaster)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623114)
 * I appreciate the quick responce but this “solution” doesn’t solve the problem
   at all.
    It seems “suppressing” the NOTICE ? but thats all. The plugin is still
   not working.
 * Yes NOTICE disabled on a live site at least prevent nasty notices showing but
   is not solving any. The meaning of those notices are to see errors, and could
   help us find a solution why a plugin or some else is not working.
 * Maybe the output below could help you some?
    Output is generated after a completely
   fresh (virgin) installation with only this plugin and nothing else!
 *     ```
       1	0.0003	  247816	{main}( ) ..\index.php:0
        2	0.0013	  251384	require( '\wordpress\wp-blog-header.php' ) ..\index.php:17
        3	0.2531	18590520	require_once( '\wordpress\wp-includes\template-loader.php' )	..\wp-blog-header.php:16
        4	0.2547	18602112	include( '\wordpress\wp-content\themes\twentytwelve\page.php' )	..\template-loader.php:47
        5	0.2748	18670696	get_template_part( )	..\page.php:21
        6	0.2748	18671520	locate_template( )	..\general-template.php:128
        7	0.2749	18671656	load_template( )	..\template.php:383
        8	0.2758	18688080	require( '\wordpress\wp-content\themes\twentytwelve\content-page.php' )	..\template.php:409
        9	0.2764	18689160	the_content( )	..\content-page.php:17
       10	0.2765	18690384	apply_filters( )	..\post-template.php:166
       11	0.2774	18693728	call_user_func_array ( )	..\plugin.php:173
       12	0.2774	18693760	PutWtiLikePost( )	..\plugin.php:173
       13	0.2774	18693952	GetWtiLikePost( )	..\wti_like_post.php:699
       14	0.2791	18694104	GetWtiVotedMessage( )	..\wti_like_post.php:658
       ```
   
 * Thanks in advance for used time and effort.
    Looking forward to find a solution
   because it is a nice plug-in.
 *  Plugin Author [webtechideas](https://wordpress.org/support/users/webtechideas/)
 * (@webtechideas)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623115)
 * Can you please share your site url. I want to have a look at that.
 *  Thread Starter [another-webmaster](https://wordpress.org/support/users/another-webmaster/)
 * (@another-webmaster)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623130)
 * [@webtechideas](https://wordpress.org/support/users/webtechideas/),
 * clicking on the gravatar gives the link to the demo site.
    I would appreciate
   to hear a solution.
 * Thanks in advance for all the time and effort.
 *  Plugin Author [webtechideas](https://wordpress.org/support/users/webtechideas/)
 * (@webtechideas)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623131)
 * Probably this is an issue with wamp server, I will have to check this. I assume
   you have added the code as I have mentioned above. Also can you please disable
   notice messages?
 *  Thread Starter [another-webmaster](https://wordpress.org/support/users/another-webmaster/)
 * (@another-webmaster)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623132)
 * Disabled notice msg and also added code as mentioned by you.
    Url (behind gravatar)
   is a **live** -semi production- demo to show the issue online to you.
 * ALthough notices are suppressed now and the code added it is still not working
   as you can see.
 * The wamp msg is not that important at the moment but for the live server it would
   be great to solve so your plug-in can be used on the other live servers.
 * Thanks in advance for all the time and effort.
 *  Plugin Author [webtechideas](https://wordpress.org/support/users/webtechideas/)
 * (@webtechideas)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623133)
 * When I checked using firebug net tab, I got warning and fatal error messages 
   when I clicked on the thumb images. The plugin script is unable to find out the
   wp-config file which is required for processing the request. So probably you 
   are not using a standard WordPress set up. If you are not familiar with using
   firebug, then give me some time and I will share a screenshot showing the error.
 *  Thread Starter [another-webmaster](https://wordpress.org/support/users/another-webmaster/)
 * (@another-webmaster)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623134)
 * Hmm what to say about that, moved (wp-config.php) it to main installation folder
   and it works.
    The issue exist because we don’t have wordpress installed in the
   main root but in a sub folder. One of many imho “must have” simple security precautions.
   Is it possible to make it so that this great plugin is (also) able to work with
   setups like ours? (wordpress installed in sub folder)
 * I am sorry that I didn’t mention it. (not being aware it could have impact like
   this)
    If you think it is not possible or it takes to many of your time I understand
   and will mark this topic as solved so at least others know the why and how.
 *  Plugin Author [webtechideas](https://wordpress.org/support/users/webtechideas/)
 * (@webtechideas)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623135)
 * It should not be a problem even when you have WordPress installed on a subfolder
   but there is something different in your set up. It means the path to wp-config
   file is different. This is fine from security point of view but many don’t do
   this. I had tested on such folder structure and never had the problem.
 * Anyway a security release will come up in less than a month’s time which will
   take care of such scenarios. You can continue using the current version and later
   easily upgrade when the new version becomes available.
 *  Thread Starter [another-webmaster](https://wordpress.org/support/users/another-webmaster/)
 * (@another-webmaster)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623142)
 * Thanks for the time and effort you have taken, looking forward to the next release.
 * Note: One of the setups we use: wordpress installation in subfolder, moving wp-
   config back to the root (one level) and a copy of index and .htaccess (incl. 
   some editing code) also to main root. Works like a charm but in rare cases (like
   this one) causing a problem.

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

The topic ‘Notice: Undefined variable’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wti-like-post_0f88b8.svg)
 * [WTI Like Post](https://wordpress.org/plugins/wti-like-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wti-like-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wti-like-post/)
 * [Active Topics](https://wordpress.org/support/plugin/wti-like-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wti-like-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wti-like-post/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [another-webmaster](https://wordpress.org/support/users/another-webmaster/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/notice-undefined-variable/#post-3623142)
 * Status: resolved