• Resolved blkpudd

    (@blkpudd)


    We are getting an notice in our Debug log as follows:

    PHP Notice: Undefined index: HTTP_USER_AGENT in /wordpress/wp-content/plugins/specific-content-for-mobile/specific-content-for-mobile.php on line 413-427

    Is this anything to worry about.

    Thank you

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Jose Mortellaro

    (@giuse)

    Hi @blkpudd

    In the next version, you will not see any more this notice, but you don’t have to worry about it.

    It means that the page was not visited by a normal browser (e.g. a robot, WP CLI..) because if the page is visited by a common browser $_SERVER[‘HTTP_USER_AGENT’] is always defined.

    To don’t see that message you have these options:

    – Waiting until the new version is public
    – Testing the beta version 0.1.8.2 that you can download from this link: https://downloads.wordpress.org/plugin/specific-content-for-mobile.0.1.8.2.zip
    – Disable the debugging in wp-config.php replacing this line:

    define( 'WP_DEBUG','true' );

    with this line:

    define( 'WP_DEBUG','false' );

    If your website is live and you don’t need the debugging, I would disable it in wp-config.php.

    You don’t have to worry about this notice, but you have a side effect, your debug.log file may become very big if that notice is triggered many times.
    If the debug.log file becomes very big and WP_DEBUG is active, the server will need more time to prepare the page and send it to the browser because it has to open and write into a big file. This is why I would not activate WP_DEBUG if you don’t really want to debug something.

Viewing 1 replies (of 1 total)

The topic ‘PHP Notice: Undefined index: HTTP_USER_AGENT’ is closed to new replies.