Title: GLOBAL
Last modified: November 10, 2018

---

# GLOBAL

 *  Resolved [Amibe Websites](https://wordpress.org/support/users/amibe/)
 * (@amibe)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/global/)
 * Hi, line 90 of two-factor-login.php is throwing an error for me because of the
   use of the GLOBAL function.
 * Could it be changed to this:
 *     ```
       global $pagenow;
       if ('wp-login.php' === $pagenow) {
         // rest of code...
       ```
   
 * Thanks, Stephen
    -  This topic was modified 7 years, 7 months ago by [Amibe Websites](https://wordpress.org/support/users/amibe/).
    -  This topic was modified 7 years, 7 months ago by [Amibe Websites](https://wordpress.org/support/users/amibe/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [David Anderson / Team Updraft](https://wordpress.org/support/users/davidanderson/)
 * (@davidanderson)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/global/#post-10866451)
 * Hi,
 * What is the error message you are seeing, and what emits it?
 * David
 *  Thread Starter [Amibe Websites](https://wordpress.org/support/users/amibe/)
 * (@amibe)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/global/#post-10866613)
 * Hi, thanks for getting back to me. Error message in log files:
 * > PHP Notice: Undefined index: pagenow
 * Environment is Ubuntu 16.04 with PHP 7.0.x and latest Nginx.
 * I’ve tested the code change suggested: it’s working and there’s no more error
   message.
 *  Plugin Author [David Anderson / Team Updraft](https://wordpress.org/support/users/davidanderson/)
 * (@davidanderson)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/global/#post-10866852)
 * Hi,
 * Making random changes just to make notices (it is a notice, not an error) go 
   away isn’t in itself a worthwhile action. The question is, why for your setup
   is the value of `$GLOBALS['pagenow']` different to the value of `$pagenow` after
   doing `global $pagenow`, since both should be identical (accessing the values
   of `pagenow` from the global scope) – [http://php.net/manual/en/reserved.variables.globals.php](http://php.net/manual/en/reserved.variables.globals.php).
 * David
 *  Plugin Author [David Anderson / Team Updraft](https://wordpress.org/support/users/davidanderson/)
 * (@davidanderson)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/global/#post-10989776)
 * Hi,
 * I’ve got to the bottom of this now, via a separate report. Thank you. It is resolved
   in version 1.3.12.
 * Many thanks,
    David

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘GLOBAL’ is closed to new replies.

 * ![](https://ps.w.org/two-factor-authentication/assets/icon-256x256.png?rev=1116775)
 * [Two Factor Authentication](https://wordpress.org/plugins/two-factor-authentication/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/two-factor-authentication/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/two-factor-authentication/)
 * [Active Topics](https://wordpress.org/support/plugin/two-factor-authentication/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/two-factor-authentication/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/two-factor-authentication/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [David Anderson / Team Updraft](https://wordpress.org/support/users/davidanderson/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/global/#post-10989776)
 * Status: resolved