WPBook Lite
Meta with message can be undefined, php error messages (3 posts)

  1. Jeffrey Schutzman
    Posted 3 years ago #

    I have been getting lots of "PHP Notice: Undefined variable: wpbook_lite_message wpbook-lite.php on line 547" messages in my debug .log

    I think they are triggered when another plugin updates a post?

    In any case I eliminated the message by replacing the update_post_meta call with

    if ( isset($wpbook_lite_message) )
    		update_post_meta($post_id, 'wpbook_lite_message', $wpbook_lite_message);

    I am not sure if this is the correct action, or if deleting the post meta when there isn't a message would be correct?


  2. John Eckman
    Plugin Author

    Posted 3 years ago #

    Hmm. Thanks for posting. Not sure what's going on there - after you made this change, are your changes to the message being saved?

  3. John Eckman
    Plugin Author

    Posted 3 years ago #

    Interesting that it points to line 547, which is where the add_action is defined for publish_post - you're probably right that it is being triggered by a post being published/updated through some other mechanism which means the message variable was never set.

    I'll try this in the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WPBook Lite
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.