Title: PHP Error
Last modified: May 23, 2022

---

# PHP Error

 *  [alexandrevanham](https://wordpress.org/support/users/alexandrevanham/)
 * (@alexandrevanham)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php-error-526/)
 * Hello,
 * Plugin is working well form me but I just would like to report I got an error.
   
   Hope this can help. Regards
 * `2022/05/23 12:28:21 [error] 5793#5793: *32569 FastCGI sent in stderr: "PHP message:
   PHP Warning: Undefined variable $wp in /var/www/html/xyz/wp-content/plugins/password-
   passthrough/password-url-passthrough.php on line 41PHP message: PHP Warning: 
   Attempt to read property "request" on null in /var/www/html/support/wp-content/
   plugins/password-passthrough/password-url-passthrough.php on line 41" while reading
   response header from upstream, client: 10.112.4.1, server: xyz, request: "GET/
   xyz HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.0-fpm.sock:", host: "xyz"`

Viewing 1 replies (of 1 total)

 *  [th0masj0](https://wordpress.org/support/users/th0masj0/)
 * (@th0masj0)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/php-error-526/#post-16075387)
 * Hey,
 * the fix is easy but requires manual edit of plugin file password-url-passthrough.
   php. Just insert “global $wp;” in line 41 for defining the global variable $wp.
   It looks like this:
 *     ```
       ....
               unset($_GET['pw']);
       		global $wp;
               $redirect_url = home_url($wp->request) . add_query_arg( 'pw', null );
               wp_safe_redirect( $redirect_url );
       ....
       ```
   
 * Please use this code “As Is – No Warranty”!
 * Regards
    Thomas

Viewing 1 replies (of 1 total)

The topic ‘PHP Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/password-passthrough.svg)
 * [Password Passthrough](https://wordpress.org/plugins/password-passthrough/)
 * [Support Threads](https://wordpress.org/support/plugin/password-passthrough/)
 * [Active Topics](https://wordpress.org/support/plugin/password-passthrough/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/password-passthrough/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/password-passthrough/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [th0masj0](https://wordpress.org/support/users/th0masj0/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/php-error-526/#post-16075387)
 * Status: not a support question