Ready to get started?Download WordPress


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

  1. ram108
    Posted 1 year ago #

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


  2. DarkWolf
    Plugin Author

    Posted 1 year 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 ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.