WordPress.org

Forums

Swiftype Search
[resolved] Undefined variables with WP_DEBUG set (4 posts)

  1. NewClarity
    Member
    Posted 2 years ago #

    Your plugin throws the following error when WP_DEBUG is set to true:

    Notice: Undefined variable: engine in /Users/mikeschinkel/Sites/wp34/public_html/wp-content/plugins/swiftype-search/class-swiftype-plugin.php on line 219

    If you add the following line right after public function check_engine_initialized() it'll keep an error from being thrown:

    $engine = false;

    Hope this helps.

    http://wordpress.org/extend/plugins/swiftype-search/

  2. NewClarity
    Member
    Posted 2 years ago #

    Oops, it appears there are more:

    Notice: Undefined variable: reponse_code in /Users/mikeschinkel/Sites/wp34/public_html/wp-content/plugins/swiftype-search/class-swiftype-client.php on line 267 Notice: Undefined variable: document_type in /Users/mikeschinkel/Sites/wp34/public_html/wp-content/plugins/swiftype-search/class-swiftype-plugin.php on line 227

    Suggestion: Add the following line at the top of your /wp-config.php file for the sites which you are using to develop and test this plugin (doing so is pretty much a best-practice for plugin development on WordPress):

    define('WP_DEBUG', true );

  3. matthewtyriley
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for the suggestion. I just pushed a fix for the issue you mention and fixed a couple of other small things that Debug uncovered.

  4. matthewtyriley
    Member
    Plugin Author

    Posted 2 years ago #

    Resolving this issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Swiftype Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic