WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
[resolved] PHP Notices with WP_DEBUG (3 posts)

  1. justin_k
    Member
    Posted 1 year ago #

    With WP_DEBUG defined, numerous PHP notices occur:

    "PHP Notice: Undefined index: HTTP_REFERER in /<path>/wordpress/wp-content/plugins/relevanssi/lib/excerpts-highlights.php on line 225"

    Should check isset() first, since HTTP_REFERER is set by the useragent and is thus not necessarily reliable.

    Thanks :)

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks, I'll fix this in the next version.

  3. jrf
    Member
    Posted 1 year ago #

    Fix suggestion:

    $referrer = ( isset( $_SERVER['HTTP_REFERER'] ) ) ? preg_replace('@(http|https)://@', '', stripslashes(urldecode($_SERVER['HTTP_REFERER']))) : '';

    (been using this already for a few versions)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.