Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Form API checks for the $_POST variable and throws an error if not set any. The openid provider unsets the $_POST variable when presenting the user a little form to decide if she wants to login to the relying party site.
The following error is thrown:
Notice: Undefined variable: _POST in drupal_build_form() (line 309 of /path/to/my/drupal/includes/form.inc).
As mentioned in #1 solved by using $_POST = array(); instead of unset($_POST);
Comment | File | Size | Author |
---|---|---|---|
#1 | reseting_post_variable_instead_of_unsetting-1760342-1.patch | 697 bytes | xamanu |
Comments
Comment #1
xamanu CreditAttribution: xamanu commentedThis can be solved easily by using
$_POST = array();
instead ofunset($_POST);
Here is the patch.
Comment #2
leochid CreditAttribution: leochid commentedPatch in #1 works.
Comment #2.0
Shyamala CreditAttribution: Shyamala commentedediting issue summary
Comment #3
anarcat CreditAttribution: anarcat commentedpushed to 6.x and 7.x, thanks.
Comment #4.0
(not verified) CreditAttribution: commentedediting issue summary