WordPress.org

Ready to get started?Download WordPress

Forums

Smooth Page Scroll to Top
PHP Notice: Undefined variable: mobile (2 posts)

  1. ram108
    Member
    Posted 7 months ago #

    PHP Notice: Undefined variable: mobile in /.../wp-content/plugins/smooth-page-scroll-to-top/smooth_scroll.php on line 24

    http://wordpress.org/plugins/smooth-page-scroll-to-top/

  2. DarkWolf
    Member
    Plugin Author

    Posted 7 months ago #

    ATM my plugin check $_SERVER['HTTP_USER_AGENT'] in mobile_list and set $mobile to "Yes" if is present...
    Well, u can have Undefined variable only if your browser do not send USER_AGENT string.
    I think this can be fixed with a small fix:

    Change line 24 block with this and, please, test if it work fine:

    // Start only if isn't mobile
    if (!isset($mobile))
    {

    With this now check simply if $mobile isset or not ;)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.