• Resolved Josh_A

    (@josh_a)


    When using wp cli I’m seeing the following warnings:

    PHP Warning:  Undefined array key "SERVER_NAME" in /sites/mysite.com/files/wp-content/plugins/use-clients-time-zone/use-clients-timezone-class.inc.php on line 15
    
    Warning: Undefined array key "SERVER_NAME" in /sites/mysite.com/files/wp-content/plugins/use-clients-time-zone/use-clients-timezone-class.inc.php on line 15
    
Viewing 1 replies (of 1 total)
  • Plugin Author drmikegreen

    (@drmikegreen)

    This plugin retrieves the time zone of the client using “Automatic Timezone Detection Using JavaScript” (https://pellepim.bitbucket.org/jstz/) the first time that a client accesses the site, sets a cookie containing the client’s time zone on the client, and reloads the page.

    It cannot, therefore, be used with wp cli.

    The line referenced (line 15 of the use-clients-timezone-class.inc.php file) happens to be a coding “artifact” (something left there when a coding change makes it unused). If it were removed, however, the plugin would still not work with wp cli. It is meant to get the time from the end user’s computer and uses coding which will only work in the context of a web browser on their computer.

Viewing 1 replies (of 1 total)
  • The topic ‘Undefined array key’ is closed to new replies.