WordPress.org

Forums

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

  1. Jeff Pye Brook
    Member
    Posted 2 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?

    http://wordpress.org/extend/plugins/wpbook-lite/

  2. John Eckman
    Member
    Plugin Author

    Posted 2 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
    Member
    Plugin Author

    Posted 2 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

About this Topic

Tags

No tags yet.